连接失败=>ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null} Android Wear
Connection Failed=>ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null} Android Wear
我正在尝试从 Android wear watch (moto 360 sport) 获取 GPS 坐标。作为迈向它的第一步,我需要连接到 GoogleApiClient。下面是相同的代码。但是与 GoogleApiClient 的连接总是失败并显示错误消息。
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
setAmbientEnabled();
mContainerView = (BoxInsetLayout) findViewById(R.id.container);
mTextView = (TextView) findViewById(R.id.text);
mClockView = (TextView) findViewById(R.id.clock);
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addApi(Wearable.API)
.addApi(LocationServices.API)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.build();
}
@Override
protected void onResume() {
super.onResume();
mGoogleApiClient.connect();
}
@Override
protected void onPause() {
super.onPause();
mGoogleApiClient.disconnect();
}
连接失败=>ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null}
我看了。接受的答案对我不起作用。我手机 phone 的 google 播放服务版本是 9.4.52(440-127739847),我手表的 google 播放服务版本是 8.7.01(2590918-534)。我在手表中点击了这个版本。但是它检查更新没有显示任何东西(我的手表需要 wifi 来检查更新和安装更新吗?)。由于接受的答案不起作用,我转到该线程的最后一个答案。所以我下载了 8.7.01 (2590918-440)(尽管最后 3 个数字不匹配)。当我试图在我的手机上安装这个 apk 时,我遇到了失败 [INSTALL_FAILED_VERSION_DOWNGRADE]
因为我手机上的播放服务版本高于手表。我应该如何处理这个问题?
非常感谢您的帮助。谢谢
一些 Android Wear 手表(根据民意调查,约占 10%)卡在较低的 Play 服务版本中。如果您的手表是其中之一,则按版本号 或其他任何方式 都不会使其更新。 Google 知道这个问题(参见 here and here), and likely to find a solution soon (see here)。在问题解决之前,他们暂时建议不要使用 Play Sevices 9.x。
请注意,使用 9.x 的可穿戴 apk,包装到 Application-release.apk 不会部署在卡在 8.x 的手表上。它将永远等待 Play 服务更新。
例如使用:
compile "com.google.android.gms:play-services-location:8.4.0"
而不是
compile "com.google.android.gms:play-services-location:9.4.0"
在您的 build.gradle 应用程序和可穿戴设备方面。
您的 phone 运行更高版本并不重要。
我正在尝试从 Android wear watch (moto 360 sport) 获取 GPS 坐标。作为迈向它的第一步,我需要连接到 GoogleApiClient。下面是相同的代码。但是与 GoogleApiClient 的连接总是失败并显示错误消息。
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
setAmbientEnabled();
mContainerView = (BoxInsetLayout) findViewById(R.id.container);
mTextView = (TextView) findViewById(R.id.text);
mClockView = (TextView) findViewById(R.id.clock);
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addApi(Wearable.API)
.addApi(LocationServices.API)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.build();
}
@Override
protected void onResume() {
super.onResume();
mGoogleApiClient.connect();
}
@Override
protected void onPause() {
super.onPause();
mGoogleApiClient.disconnect();
}
连接失败=>ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null}
我看了
非常感谢您的帮助。谢谢
一些 Android Wear 手表(根据民意调查,约占 10%)卡在较低的 Play 服务版本中。如果您的手表是其中之一,则按版本号 或其他任何方式 都不会使其更新。 Google 知道这个问题(参见 here and here), and likely to find a solution soon (see here)。在问题解决之前,他们暂时建议不要使用 Play Sevices 9.x。
请注意,使用 9.x 的可穿戴 apk,包装到 Application-release.apk 不会部署在卡在 8.x 的手表上。它将永远等待 Play 服务更新。
例如使用:
compile "com.google.android.gms:play-services-location:8.4.0"
而不是
compile "com.google.android.gms:play-services-location:9.4.0"
在您的 build.gradle 应用程序和可穿戴设备方面。
您的 phone 运行更高版本并不重要。