谷歌示例android-SynchronizedNotifications不起作用

时间:2016-08-27 18:29:15

标签: android wear-os android-wear-notification

Google示例android-SynchronizedNotifications无效,因为它无法连接到Google API客户端。 如何解决?

我下载了https://github.com/googlesamples/android-SynchronizedNotifications/并在Android Studio中的模拟器中运行了应用程序。 此示例使用GoogleApiClient.Builder中的Wearable.API,但失败并显示错误:

08-27 12:38:40.355 2532-2532/com.example.android.wearable.synchronizednotifications
E/SynchronizedFragment: Failed to connect to Google API Client

从调试中我得到了一个理由:

  

API_UNAVAILABLE:connectionResult = {ConnectionResult @ 4465}   “ConnectionResult {statusCode = API_UNAVAILABLE,resolution = null,   消息= NULL}“

我的设置详情:

OS - MAC X El Capitan

Java - jdk1.8.0_102

Project使用API​​ 23(marshmallow)编译,安装了Google API,Google Play服务,Google存储库,Android支持存储库

模拟器 - 来自Android Studio,API 23,Nexus 5

我没有使用Google API的任何凭据,例如OAuth 2.0 for Google Play Android Developer API或API密钥,因为我找不到任何有关在GoogleApiClient.Builder中使用Wearable.API的信息,您需要使用任何类型的凭据。

0 个答案:

没有答案
相关问题