不适用于天蓝色的论点

时间:2013-05-07 08:51:28

标签: android azure-storage azure-storage-blobs

  

方法中的delete(Object,TableDeleteCallback)类型   MobileServiceTableBase不适用于   参数(JsonObject,List>,new   TableDeleteCallback(){})

上面的错误代码。尝试从Android应用程序

创建或删除blob容器
    public void deleteBlob(final String containerName, String blobName) {
    //Create the json Object we'll send over and fill it with the required
    //id property - otherwise we'll get kicked back
    JsonObject blob = new JsonObject();     
    blob.addProperty("id", 0);
    //Create parameters to pass in the blob details.  We do this with params
    //because it would be stripped out if we put it on the blob object
    List<Pair<String,String>> parameters = new ArrayList<Pair<String, String>>();
    parameters.add(new Pair<String, String>("containerName", containerName));
    parameters.add(new Pair<String, String>("blobName", blobName));     
    mTableBlobs.delete(blob, parameters, new TableDeleteCallback() {            
        @Override
        public void onCompleted(Exception exception, ServiceFilterResponse response) {
            if (exception != null) {
                Log.e(TAG, exception.getCause().getMessage());
                return;
            }
            //Refetch the blobs from the server
            getBlobsForContainer(containerName);
        }
    });
}

1 个答案:

答案 0 :(得分:0)

错误消息指出应该使用2个参数调用delete()方法,并且您传递3,这就是它无法编译的原因。