0
我试图删除一个使用Google Drive API与我共享的文件,但由于我不是该文件的所有者,因此我收到了权限错误。我看着网上找到这个solution。我实施了如下解决方案:从我共享的文件夹中完全删除一个文件
About about = service.about().get().execute();
String rootId = about.getRootFolderId();
service.parents().delete(fileId, rootId).execute();
但是,我无法用此代码删除文件。它不会给出任何错误,但我仍然可以在我的谷歌驱动器中看到该文件。
PS:我检查了fileId
参数,它引用了正确的文件。