简体   繁体   English

对于Google Play服务,Android Wear模拟器显示错误SERVICE_VERSION_UPDATE_REQUIRED

[英]Android Wear Emulator show Error SERVICE_VERSION_UPDATE_REQUIRED for Google Play services

I am testing android wear app on Wear Emulator and using eclipse to develop. 我正在Wear Emulator上测试android wear应用,并使用eclipse开发。

In wear app there are code as below in onCreate: 在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();

When I run this on Wear emulator I got error as below: 在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}

If any one have solution or tips for that then please let me know. 如果有任何解决方案或提示,请告诉我。

Thanks! 谢谢!

I believe I had the same error. 我相信我也有同样的错误。

If your build.gradle is: 如果您的build.gradle是:

compile 'com.google.android.gms:play-services:+'

change it to: 更改为:

compile 'com.google.android.gms:play-services:5.0.89'

that's because Google didn't completely roll out the latest play services to devices, but it's already available to developers. 这是因为Google并未完全向设备推出最新的播放服务,但开发人员已经可以使用它。 As an alternative solution, you can check if there's an update to the WearEmulator on the SDK Manager. 作为替代解决方案,您可以检查SDK Manager上的WearEmulator是否有更新。

If you look in your build.gradle file, you are probably using play-services. 如果您查看build.gradle文件,则可能正在使用播放服务。 You need to use play-services-wearable instead, which has the correct version. 您需要改用具有正确版本的play-services-wearable。

compile 'com.google.android.gms:play-services-wearable:+'

If you are using Eclipse, you need to ensure you unpack the play-services-wearable AAR file and not the standard mobile play-services AAR file. 如果使用的是Eclipse,则需要确保解压缩可穿戴播放服务的AAR文件,而不是标准的移动播放服务AAR文件。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android Wear错误ConnectionResult {statusCode = SERVICE_VERSION_UPDATE_REQUIRED,resolution = null} - Android Wear Error ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null} Google Play服务API客户端无法连接:SERVICE_VERSION_UPDATE_REQUIRED - Google Play services API client can't connect: SERVICE_VERSION_UPDATE_REQUIRED 在Android中集成Google Plus时,SERVICE_VERSION_UPDATE_REQUIRED和Google Play服务已过期 - SERVICE_VERSION_UPDATE_REQUIRED and Google play service out of date while integrating Google Plus in android 在Android上使用Firebase Analytics时出现SERVICE_VERSION_UPDATE_REQUIRED错误 - SERVICE_VERSION_UPDATE_REQUIRED error using Firebase Analytics on Android 连接失败=> ConnectionResult {statusCode = SERVICE_VERSION_UPDATE_REQUIRED,分辨率=空,消息=空} Android Wear - Connection Failed=>ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null} Android Wear SERVICE_VERSION_UPDATE_REQUIRED - SERVICE_VERSION_UPDATE_REQUIRED Android GoogleApiAvailability SERVICE_VERSION_UPDATE_REQUIRED我可以获得推送令牌吗? - Android GoogleApiAvailability SERVICE_VERSION_UPDATE_REQUIRED Can I get push token? GooglePlayServicesAvailable何时返回SERVICE_VERSION_UPDATE_REQUIRED? - When does isGooglePlayServicesAvailable return SERVICE_VERSION_UPDATE_REQUIRED? 由于错误代码:SERVICE_VERSION_UPDATE_REQUIRED而无法连接到GoogleApiClient - Cannot connect to GoogleApiClient due to errorcode: SERVICE_VERSION_UPDATE_REQUIRED 错误:请在Android模拟器中更新您的Google Play服务(版本应为10.2.0) - error: Please update your Google Play service in Android emulator (version should be 10.2.0)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM