[英]Android Wear Error ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null}
[英]Android Wear Emulator show Error SERVICE_VERSION_UPDATE_REQUIRED for Google Play services
我正在Wear Emulator上测试android wear应用,并使用eclipse开发。
在Wear应用中,onCreate中包含以下代码:
mGoogleApiClient = new GoogleApiClient.Builder(this).addConnectionCallbacks(this).addOnConnectionFailedListener(new GoogleApiClient.OnConnectionFailedListener()
{
@Override
public void onConnectionFailed(ConnectionResult result)
{
Log.d(TAG, "onConnectionFailed: " + result);
}
}).addApi(Wearable.API).build();
mGoogleApiClient.connect();
在Wear模拟器上运行此命令时,出现以下错误:
W/GooglePlayServicesUtil(1809): Google Play services out of date. Requires 5089000 but found 5077534
D/WearApp(1809): onConnectionFailed: ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null}
如果有任何解决方案或提示,请告诉我。
谢谢!
我相信我也有同样的错误。
如果您的build.gradle是:
compile 'com.google.android.gms:play-services:+'
更改为:
compile 'com.google.android.gms:play-services:5.0.89'
这是因为Google并未完全向设备推出最新的播放服务,但开发人员已经可以使用它。 作为替代解决方案,您可以检查SDK Manager上的WearEmulator是否有更新。
如果您查看build.gradle文件,则可能正在使用播放服务。 您需要改用具有正确版本的play-services-wearable。
compile 'com.google.android.gms:play-services-wearable:+'
如果使用的是Eclipse,则需要确保解压缩可穿戴播放服务的AAR文件,而不是标准的移动播放服务AAR文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.