GooglePlayServicesUtil:谷歌Play服务的过时。需要5089000但发现5077534 [英] GooglePlayServicesUtil: Google Play services out of date. Requires 5089000 but found 5077534

查看:432
本文介绍了GooglePlayServicesUtil:谷歌Play服务的过时。需要5089000但发现5077534的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个更新的谷歌播放服务SDK的一个问题。

I have a problem with an update to the google-play-services SDK.

我的应用程序生成并运行(像以前一样) - 但对Android磨损腕表,此消息是在日志中:

My app builds and runs (as it did before) - but on the Android wear watch, this message is in the logs:

GooglePlayServicesUtil:谷歌Play服务的过时。需要5089000但发现5077534

GooglePlayServicesUtil﹕ Google Play services out of date. Requires 5089000 but found 5077534

所以,应用与5.0.89编译但手表只有5.0.77版本。

So the app is compiling with 5.0.89 but the watch only has version 5.0.77.

手表和手机之间的通信,现在失败(它的工作previously)。

The communication between the watch and the phone now fails (it had worked previously).

我将如何使应用程序与早期版本的谷歌给出播放服务向后兼容Android的那Studio不提供一种方式回到早期版本的谷歌播放服务?

How would I make the app backwards compatible with earlier versions of google-play-services given that Android Studio doesn't provide a way to go back to earlier versions of google-play-services?

这些是磨损的应用的gradle设置

These are the gradle settings for the wear app

dependencies {
   compile 'com.google.android.gms:play-services:5.0.+@aar'
   compile "com.android.support:support-v13:20.0.+"
   compile "com.google.android.support:wearable:1.0.+"
}

如果我尝试,并迫使Android Studio中使用的版本5.0.77抱怨它在build:

If I try and force Android Studio to use version 5.0.77 it complains in the build:

错误:无法找到:com.google.android.gms:播放服务:5.0.77

Error:Failed to find: com.google.android.gms:play-services:5.0.77

我怎样才能保持与早期版本的谷歌播放服务手表兼容?

How can I remain compatible with watches with earlier versions of Google play services?

推荐答案

需要在耐磨侧的build.gradle进行更新,以便使用播放服务,耐磨,而不是只打服务,如你已经如上图所示。

The build.gradle on the wearable side needs to be updated to use play-services-wearable instead of just play-services like you have shown above.

所以,如果你看一下磨损SDK中提供数据层一样的样品之一,它使用可穿戴/的build.gradle是这样的:

So if you look at one of the samples like DataLayer provided in the Wear SDK, it uses something like this in wearable/build.gradle:

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

我已经提出一个要求得到这个官方文件中提到尽快

I have put in a request to get this mentioned in the official documentation soon.

这篇关于GooglePlayServicesUtil:谷歌Play服务的过时。需要5089000但发现5077534的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆