Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/346.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 丢弃或删除共享文件_Java_Google App Engine_Google Drive Api - Fatal编程技术网

Java 丢弃或删除共享文件

Java 丢弃或删除共享文件,java,google-app-engine,google-drive-api,Java,Google App Engine,Google Drive Api,我正在尝试删除或丢弃共享文件,如下所示 删除 service.files().delete(id).execute(); 垃圾 但在删除案例中,不显示任何错误,但文件未被删除,文件仍在我的驱动器上 在垃圾箱里,我得到了这个错误 { "code" : 403, "errors" : [ { "domain" : "global", "location" : "Authorization", "locationType" : "h

我正在尝试删除或丢弃共享文件,如下所示

删除

 service.files().delete(id).execute();
垃圾

但在删除案例中,不显示任何错误,但文件未被删除,文件仍在我的驱动器上

在垃圾箱里,我得到了这个错误

     {
        "code" : 403,
        "errors" : [ {
    "domain" : "global",
    "location" : "Authorization",
    "locationType" : "header",
    "message" : "The authenticated user does not have the required access to the file 1-Vt5gM2SLknnJs3nRFjWUly--nzfX1IWah-PxhLbNxo",
    "reason" : "userAccess"
  } ],
  "message" : "The authenticated user does not have the required access to the file 1-Vt5gM2SLknnJs3nRFjWUly--nzfX1IWah-PxhLbNxo"
}
那么,如何删除、丢弃或取消订阅共享文件呢


thx提前

我的建议是获得必要的权限来执行您试图执行的操作。我可以编辑该文件的权限,因此不存在任何问题的权限实际上这是一个问题。。。要删除该文件,您必须是该文件的所有者。
     {
        "code" : 403,
        "errors" : [ {
    "domain" : "global",
    "location" : "Authorization",
    "locationType" : "header",
    "message" : "The authenticated user does not have the required access to the file 1-Vt5gM2SLknnJs3nRFjWUly--nzfX1IWah-PxhLbNxo",
    "reason" : "userAccess"
  } ],
  "message" : "The authenticated user does not have the required access to the file 1-Vt5gM2SLknnJs3nRFjWUly--nzfX1IWah-PxhLbNxo"
}