android - Google 云端硬盘 API 不可用

标签 android google-drive-android-api

突然尝试使用将文件保存到 Google 云端硬盘,无需进行任何更改

 Drive.DriveApi.getAppFolder(mGoogleApiClient)
                .createFile(mGoogleApiClient, changeSet, result.getDriveContents())
                .setResultCallback(fileCallback);

显示一个警告对话框,其中显示“应用需要一项或多项当前不可用的 Google Play 服务...”

我没有更改任何代码,所以有人可以告诉我哪里出了问题吗?谢谢

我也得到了日志

Bad call: specified package com.google.android.gms under uid 10349 but it is really 10016

我也在实现这个库

implementation "com.google.android.gms:play-services-drive:17.0.0"

最佳答案

Google Drive SDK已弃用。为了使用 Google Drive SDK,您需要使用驱动器 REST API。

来自文档:

This API is deprecated. Clients must migrate to the Drive REST API or another suitable solution to avoid disruptions to your application.

关于android - Google 云端硬盘 API 不可用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60539560/

相关文章:

android - Android webview 中的所见即所得

android - Lollipop 上的 9Patch 在背景中显示灰色椭圆形

android - 如何获取要在android中下载的谷歌驱动器文件的url

java - 如何在 Google Drive 中的文件夹内创建文件夹?

android - 断开应用后 Google Drive Android API 仍然返回成功结果,但不上传文件

android - 防止在 Android 上的 Chrome 中滚动 body 不起作用并生成错误消息

java - Retrofit 2,如何在其他 Activity 中访问收到的ArrayList?

android - 启用 64 位后,Unity 游戏在 Android 设备上滞后

android - 带有 Google Drive SDK 的 Play Store 应用程序始终显示 'Choose account' 弹出窗口

android - 从谷歌驱动器 URI 获取文件名