W/GooglePlayServicesUtil: Google 播放服务已过时。需要 8298000 但找到 8107534

W/GooglePlayServicesUtil: Google Play services out of date. Requires 8298000 but found 8107534

关于 SO 的许多其他问题,我遇到了类似的错误消息。与其他问题不同,这是关于硬件调试设备。

我的 gradle wear-build 文件如下所示:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.google.android.support:wearable:1.2.0'
    compile 'com.google.android.gms:play-services-wearable:8.3.0'
    compile 'com.android.support:appcompat-v7:23.1.0'
}

在模拟器中调试应用程序工作正常,但一旦我发布应用程序并将其安装到我的可穿戴设备上,移动设备和可穿戴设备之间的连接将无法正常工作。通过蓝牙调试磨损(除此之外别无他法),显示了这一行调试信息:

W/GooglePlayServicesUtil: Google Play services out of date. Requires 8298000 but found 8107534

我认为 gradle 依赖项会将可穿戴服务打包到已发布的 apk 中(就像 'compile' 那样),对吗?

如何让硬件手表工作?

Google Play 服务不会与您的应用程序捆绑在一起,因此您看到的是您的手表正在使用 8.1 版的 Play 服务(安装在您的手表上)并且您编译了您的更高版本的应用程序无法正常工作;您手表上安装的版本应始终大于或等于您编译应用程序时使用的版本(您的 phone 也是如此)

Google 在您的手机设备上 "Download Google play services" 将打开您的应用商店,然后单击更新。 应该可以了。

更改此声明

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

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

我的解决方案是在我的模拟器上升级 Android Wear Smart Watch

首先,我注意到我的 Google 模拟器上的 Play 服务已过时。

进入游戏商店,点击顶部菜单:

找到 Android Wear Smart Watch,并更新它。

在那之后,我的 Google 播放服务是最新的。