驱动器 ID 仅适用于使用同一设备

Drive id only working with using same device

Google 驱动文件下载仅在与上传的设备一起使用时有效。当我尝试从其他设备下载时它不起作用,那时它从驱动器 API 给出错误响应 'Drive id invalid'。我不知道为什么会这样?

基于此thread, the DriveId is a 'preliminary' Id that changes after the object has been committed. Check this link。另外,请注意每个 file/folder 的 DriveID 是特定于设备的。

  • Android Google DriveApi returning different DriveID for same title on different devices

    The DRIVE_ID identifier is specific to your particular device, so if you use it on another device, it means nothing. The RESOURCE_ID is unique across devices, so that's the one you need to use for any type of synchronization. See SO 22841237.

希望对您有所帮助!