Android 磨损:Google 播放服务已过时。需要 9256000 但找到 8701534
Android Wear: Google Play services out of date. Requires 9256000 but found 8701534
我的 Android Wear 应用无法正常工作。每次它尝试在 phone 上打开某些内容时,我都会在 logcat:
中收到此错误
W/GooglePlayServicesUtil: Google Play services out of date. Requires 9256000 but found 8701534
我的应用程序应该没有问题,因为它以前工作过。当我对 LG G Watch 进行出厂重置时,它停止工作了。
我用一个应用程序检查了手表上的 Google Play 版本代码,它是(如 logcat 所说)8701534
。 (为什么不更新?)我的 phone 有版本代码 9256448
。以下是一些屏幕截图:
(点击查看大图)
这是手表的(缩写)build.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'
}
这里是 phone 的(缩写)build.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 次)
- 已清除 cache/data 的 Google 在 phone
上播放服务
- 在 phone 上重新安装了 Google Play 服务。
- 将手表连接到 3 台不同的设备。请参阅下面的设备名称。
- 让手表保持连接状态约 12 小时。 (phone 和手表已连接并在充电器上)。什么都没有改变。
- 已将
compile 'com.google.android.gms:play-services-wearable:9.2.0'
更改为 compile 'com.google.android.gms:play-services-wearable:+'
以下是我试过的 phone 型号,包括手表:
- LG G 手表 LGW100(Android6.0.1,Android佩戴 1.5)
- 华为 Nexus 6P(Android牛轧糖预览版 4)
- 三星 Galaxy S5 (Android 6.0.1)
- 三星 Galaxy S6 (Android 6.0.1)
我确定不是 phone 因为我在三个不同的设备上连接了手表。
你有什么建议吗?
您可以编辑依赖版本:
compile 'com.google.android.gms:play-services-wearable:8.7.0'
注意 8.7 而不是 9.2。另请注意,这不是修复,而是解决方法。
编辑:在完美世界中,所有手表都会立即更新到最新的播放服务,但情况似乎并非如此还。这也是为什么我将此声明为解决方法而不是修复方法的原因。
我今天遇到了同样的问题,但我设法克服了它。我做过的事情:
- 重装Android穿上phone(由于this)
- 取消手表与 Android Wear 应用程序的配对,然后修复它
- 从 Android Wear 应用重新同步应用几次
- 在手表上,在 Settings/About/Versions 中,我点击了几次 GMS 版本。它应该说 'Checking for updates'。起初在这个操作中 logcat 有错误,然后(在重新安装等之后)这些错误消失了。
- 开始使用地图和健身(希望它们以某种方式触发更新)
终于更新了。它花了几天时间才更新 Google Play 服务。现在它有版本 9.2.56
。我想手表更新 Google Play 服务需要一些时间。
另一种选择是通过 odb 手动升级 Google Play 服务:
- 下载最新的 Google Play 服务 apk(来自 here)
- 通过
adb install -r com.google.android.gms*
安装
我的手表(Samsung Gear S with Wear 1.5)在恢复出厂设置后有非常旧的 Google Play 服务版本(与您的相同:8.7.01 - 534)并且在配对后没有安装任何应用程序。手动更新播放服务解决了这个问题。
我的 Android Wear 应用无法正常工作。每次它尝试在 phone 上打开某些内容时,我都会在 logcat:
中收到此错误W/GooglePlayServicesUtil: Google Play services out of date. Requires 9256000 but found 8701534
我的应用程序应该没有问题,因为它以前工作过。当我对 LG G Watch 进行出厂重置时,它停止工作了。
我用一个应用程序检查了手表上的 Google Play 版本代码,它是(如 logcat 所说)8701534
。 (为什么不更新?)我的 phone 有版本代码 9256448
。以下是一些屏幕截图:
(点击查看大图)
这是手表的(缩写)build.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'
}
这里是 phone 的(缩写)build.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 次)
- 已清除 cache/data 的 Google 在 phone 上播放服务
- 在 phone 上重新安装了 Google Play 服务。
- 将手表连接到 3 台不同的设备。请参阅下面的设备名称。
- 让手表保持连接状态约 12 小时。 (phone 和手表已连接并在充电器上)。什么都没有改变。
- 已将
compile 'com.google.android.gms:play-services-wearable:9.2.0'
更改为compile 'com.google.android.gms:play-services-wearable:+'
以下是我试过的 phone 型号,包括手表:
- LG G 手表 LGW100(Android6.0.1,Android佩戴 1.5)
- 华为 Nexus 6P(Android牛轧糖预览版 4)
- 三星 Galaxy S5 (Android 6.0.1)
- 三星 Galaxy S6 (Android 6.0.1)
我确定不是 phone 因为我在三个不同的设备上连接了手表。
你有什么建议吗?
您可以编辑依赖版本:
compile 'com.google.android.gms:play-services-wearable:8.7.0'
注意 8.7 而不是 9.2。另请注意,这不是修复,而是解决方法。
编辑:在完美世界中,所有手表都会立即更新到最新的播放服务,但情况似乎并非如此还。这也是为什么我将此声明为解决方法而不是修复方法的原因。
我今天遇到了同样的问题,但我设法克服了它。我做过的事情:
- 重装Android穿上phone(由于this)
- 取消手表与 Android Wear 应用程序的配对,然后修复它
- 从 Android Wear 应用重新同步应用几次
- 在手表上,在 Settings/About/Versions 中,我点击了几次 GMS 版本。它应该说 'Checking for updates'。起初在这个操作中 logcat 有错误,然后(在重新安装等之后)这些错误消失了。
- 开始使用地图和健身(希望它们以某种方式触发更新)
终于更新了。它花了几天时间才更新 Google Play 服务。现在它有版本 9.2.56
。我想手表更新 Google Play 服务需要一些时间。
另一种选择是通过 odb 手动升级 Google Play 服务:
- 下载最新的 Google Play 服务 apk(来自 here)
- 通过
adb install -r com.google.android.gms*
安装
我的手表(Samsung Gear S with Wear 1.5)在恢复出厂设置后有非常旧的 Google Play 服务版本(与您的相同:8.7.01 - 534)并且在配对后没有安装任何应用程序。手动更新播放服务解决了这个问题。