com.google.android.gms.common.api.ApiException:17:API:Drive.API_CONNECTIONLESS在此设备上不可用 [英] com.google.android.gms.common.api.ApiException: 17: API: Drive.API_CONNECTIONLESS is not available on this device

本文介绍了com.google.android.gms.common.api.ApiException:17:API:Drive.API_CONNECTIONLESS在此设备上不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是故事。我已将Google Drive Android SDK(8.1.0)集成到我的应用程序中( AnyCopy )大约在三年前。我遵循教程正确设置,包括添加凭证和API密钥。一切正常。我可以备份和恢复我的数据,没有任何问题。即使在今天,如果我从Google Play下载它,它也可以正常工作。



最近,我一直试图重构AnyCopy并整合最新的Google Drive Android SDK(Google Play服务版本号12.0.1)到我的应用程序,并遇到一个奇怪的错误消息


java.util.concurrent.ExecutionException:
com。 google.android.gms.common.api.ApiException:17:API:
Drive.API_CONNECTIONLESS在此设备上不可用。
在com.google.android.gms.tasks.Tasks.zzc(未知来源)
在com.google.android.gms.tasks.Tasks.await(未知来源)


但是,如果我使用其他签名密钥在Google控制台上创建新凭据。问题解决了。我意识到问题根源在于凭证配置。但是,我无法弄清楚如何解决它,因为它可能是Google Drive SDK向后兼容性错误。还有谁遇到过这个问题?任何建议,他将高度赞赏。

解决方案

我有同样的错误。我创建了一个新项目并获得了Google API的凭据,但忘记启用Google Drive API。去仪表板,并启用谷歌驱动器API的窍门。
希望有帮助。


Here is the story. I had integrated Google Drive Android SDK (8.1.0) into my app (AnyCopy) around three years ago. And I followed the tutorial to set up properly including adding credentials and api key. Everything worked okay. I could backup and restore my data without any problem. Even today it works okay if I download it from Google Play.

Recently I have been trying to refactor AnyCopy and integrate the newest Google Drive Android SDK (Google Play Service Version number 12.0.1 )into my app and experiencing a strange error with message

java.util.concurrent.ExecutionException: com.google.android.gms.common.api.ApiException: 17: API: Drive.API_CONNECTIONLESS is not available on this device. at com.google.android.gms.tasks.Tasks.zzc(Unknown Source) at com.google.android.gms.tasks.Tasks.await(Unknown Source)

However, if I create a new credential on Google Console with a different signing key. And the problem is resolved. I realize that the problem rooted from the credential configuration. However, I could not figure out how to resolve it as it might be a Google Drive SDK backwards compatibility bug. Anyone else has ever run into this issue? Any suggestion will he highly appreciated.

解决方案

I had the same error. I created a new project and got the credentials for the google API but forgot to enable the Google Drive API. Going to the dashboard and enabling the google drive API did the trick. Hope that helps.

这篇关于com.google.android.gms.common.api.ApiException:17:API:Drive.API_CONNECTIONLESS在此设备上不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆