我的 Android Wear 应用程序无法运行。每次尝试在手机上打开某些内容时,我都会在 logcat 中收到此错误:
W/GooglePlayServicesUtil: Google Play services out of date. Requires 9256000 but found 8701534
我的应用程序应该没有任何问题,因为它以前有效。当我在 LG G Watch 上恢复出厂设置时,它停止工作。
我用应用程序检查了手表上的 Google Play 版本代码,它是(如 logcat 所示)8701534
。 (为什么不更新?)我的手机有版本号9256448
。以下是一些屏幕截图:
(点击查看更大的屏幕截图)。
这是(缩短的)构建.gradle手表的:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.my.packagename"
minSdkVersion 21
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.support:wearable:1.3.0'
compile 'com.google.android.gms:play-services-wearable:9.2.0'
}
这是(缩短的)构建.gradle电话:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.my.packagename"
minSdkVersion 11
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
wearApp project(':wear')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.google.android.gms:play-services-wearable:9.2.0'
...
}
我已经尝试过通常的事情,例如:
- 手表恢复出厂设置(已恢复约 5 次)
- 清除手机上 Google Play 服务的缓存/数据
- 在手机上重新安装 Google Play 服务。
- 将手表连接到 3 个不同的设备。请参阅下文了解设备名称。
- 让手表保持连接状态约 12 小时。 (手机和手表均已连接且位于充电器上)。没有改变。
- Changed
compile 'com.google.android.gms:play-services-wearable:9.2.0'
to compile 'com.google.android.gms:play-services-wearable:+'
以下是我尝试过的手机型号,包括手表:
- LG G 手表 LGW100(Android 6.0.1、Android Wear 1.5)
- 华为 Nexus 6P(Android Nougat 预览版 4)
- 三星 Galaxy S5(安卓 6.0.1)
- 三星 Galaxy S6(安卓 6.0.1)
我确定不是手机,因为我将手表连接在三个不同的设备上。
你有什么建议吗?
今天我遇到了同样的问题,但我设法克服了它。我所做的事情:
- 在手机上重新安装了 Android Wear(由于this https://www.reddit.com/r/moto360/comments/36mhv3/help_an_application_requires_an_update_to_the/crfhjfo)
- 从 Android Wear 应用程序中取消手表配对,然后进行修复
- 从 Android Wear 应用程序重新同步应用程序几次
- 在手表上的“设置/关于/版本”中,我点击了 GMS 版本几次。它应该显示“正在检查更新”。起初,logcat 在此操作时出现错误,然后(重新安装等后)这些错误消失了。
- 启动了地图和健身(希望它们能以某种方式触发更新)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)