【问题标题】:API_UNAVAILABLE Google API clientAPI_UNAVAILABLE Google API 客户端
【发布时间】:2015-05-19 00:12:47
【问题描述】:

无法连接到 Google API 客户端:ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null}

我正在尝试在我的应用中实现基本的 g+ 登录,并且我已按照与 Drive API for Android Getting Started 中完全相同的步骤进行操作。

以前有人见过这个错误吗?

当我点击登录按钮时,我会收到选择我的谷歌帐户的提示。选择帐户后,我的应用程序中没有任何反应。

日志如下:

E/MDM     (32664): [33508] b.run: Couldn't connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null}
I/LoadedApk(32664): getClassLoader :dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/com.android.location.provider.jar", zip file "/system/framework/com.android.media.remotedisplay.jar", zip file "/data/app/com.google.android.gms-2/base.apk"],nativeLibraryDirectories=[/data/app/com.google.android.gms-2/lib/arm64, /vendor/lib64, /system/lib64]]]
I/SurfaceFlinger( 3100): id=2396 Removed SurfaceView (-2/9)
D/LocationInitializer(29281): Restart initialization of location
W/ActivityManager( 3499): userId = 0, bbcId = -10000
W/ActivityManager( 3499): NORMAL SET : dst_category = 701, src_allowCategory = 0,701-1023

【问题讨论】:

标签: android google-plus


【解决方案1】:

根据API_UNAVAILABLE 的 Google 文档:

您尝试连接的某个 API 组件不可用。该 API 无法在此设备上运行,更新 Google Play 服务不太可能解决问题。应避免在设备上使用 API。

还要检查您是否在manifest 中输入了正确的设置和密钥。 如果可能,请尝试使用不同的设备。如果您发布如何创建客户端、设备类型/操作系统等的代码,它可能会缩小问题的范围。

【讨论】:

    【解决方案2】:

    这里也发生了同样的情况。我以为它已激活,但和我一样,您可能还没有在 Google Api 控制台上激活 Google+ Api。

    点击您想要的 API,您会在顶部找到一个“激活”按钮。

    等待几分钟,关闭您的应用,然后重试。它可能会起作用。

    【讨论】:

    • 我没有使用任何 API。我正在做材料设计的示例应用程序
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-04-08
    • 2016-02-26
    • 1970-01-01
    • 1970-01-01
    • 2015-09-20
    • 2020-09-23
    • 2016-12-03
    相关资源
    最近更新 更多