2013-05-07 85 views
0

的方法,在型 MobileServiceTableBase刪除(對象,TableDeleteCallback)不適用於 參數(的JSONObject,列表>,新 TableDeleteCallback(){})不適用於參數天青

上面的錯誤代碼。試圖創建或Android應用

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); 
     } 
    }); 
} 

回答

0

該錯誤消息指出delete()方法應以2個參數被稱爲刪除BLOB容器,和你傳遞3,這就是爲什麼它不編譯。