更新时间:2022-06-02 10:05:03
这可能有点晚了,但是...我相信会出现此问题,因为当您使用范围
This may be a bit late but... I believe the problem occurs because when you run with the scope https://www.googleapis.com/auth/drive.file you are only allowed to see the files your app has created. However, your query may potentially return metadata that are outside your auth scope.
我也遇到了同样的问题,并通过添加添加 DRIVE_METADATA_READONLY范围来设法解决该问题:
I had the same problem as well and manage to fix it by adding the DRIVE_METADATA_READONLY scope:
credential = GoogleAccountCredential.usingOAuth2(this, DriveScopes.DRIVE_FILE, **DriveScopes.DRIVE_METADATA_READONLY**);