Android Wear:Google Play服务已过期。需要9256000,但找到8701534 [英] Android Wear: Google Play services out of date. Requires 9256000 but found 8701534
问题描述
我无法让我的Android Wear应用程序正常工作。每次尝试在手机上打开某些内容时,我都会在logcat中看到这个错误:
W / GooglePlayServicesUtil:Google Play服务过时。需要9256000,但找到了8701534
我的应用程序没有什么问题,因为它以前工作过。当我在我的LG G Watch上进行了出厂重置时,它停止了工作。
我使用应用程序检查了手表上的Google Play版本代码,并且(正如logcat所述) 8701534
。 (为什么不更新?)我的手机版本号为 9256448
。以下是一些截图:
(点击查看大图)
以下是手表的
apply plugin :'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion23.0.3
defaultConfig {
applicationId com.my.packagename
minSdkVersion 21
targetSdkVersion 24
versionCode 1
versionName1.0
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefa ultProguardFile('proguard-android.txt'),'proguard-rules.pro'
}
}
}
依赖关系{
compile fileTree dir:'libs',包括:['* .jar'])
编译'com.google.android.support:wearable:1.3.0'
编译'com.google.android.gms: play-services-wearable:9.2.0'
}
这里是(缩短) build.gradle 手机:
apply plugin:'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion23.0.3
defaultConfig {
applicationIdcom.my.packagename
minSdkVersion 11
targetSdkVersion 24
versionCode 1
versionName1.0
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile(' 'proguard-android.txt'),'proguard-rules.pro'
}
}
}
依赖关系{
编译fileTree(dir:' libs',包括:['* .jar'])
wearApp项目(':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小时。 (电话和手表都连接在充电器上)。
- 更改
compile'com.google.android.gms:play-services-wearable:9.2.0'
tocompile'com.google.android.gms:play-services-wearable:+'
以下是我尝试过的手机型号,包括手表: 我确定它不是手机,因为我的手表已连接三种不同的设备。
$ hr
您有什么建议吗?
它终于更新了。它花了几天时间来更新Google Play服务。现在它的版本 9.2.56
。我想这只需要一些时间让手表更新Google Play服务。
I can't get my Android Wear app to work. Every time it tries to open something on the phone I keep getting this error in the logcat:
W/GooglePlayServicesUtil: Google Play services out of date. Requires 9256000 but found 8701534
Nothing should be wrong with my application, because it worked before. It stopped working when I did a factory reset on my LG G Watch.
I checked the Google Play version codes on the watch with an app, and it is (as the logcat tells) 8701534
. (Why isn't it updating?) My phone has the version code 9256448
. Here are some screenshots:
(Click for larger screenshots).
Here is the (shortened) build.gradle of the watch:
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'
}
And here is the (shortened) build.gradle of the phone:
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'
...
}
I have already tried the usual things like:
- Factory reset on the watch (About 5 times already)
- Cleared cache/data of Google Play services on the phone
- Reinstalled Google Play Services on the phone.
- Connected the watch to 3 different devices. See below for device names.
- Leave the watch connected for about 12 hours. (Both phone and watch connected and on the charger). Nothing changed.
- Changed
compile 'com.google.android.gms:play-services-wearable:9.2.0'
tocompile 'com.google.android.gms:play-services-wearable:+'
Here are the phone models I tried on including the watch:
- LG G Watch LGW100 (Android 6.0.1, Android Wear 1.5)
- Huawei Nexus 6P (Android Nougat Preview 4)
- Samsung Galaxy S5 (Android 6.0.1)
- Samsung Galaxy S6 (Android 6.0.1)
I'm sure it isn't the phone because I had the watch connected on three different devices.
Do you have any suggestions?
It finally updated. It took a few days for it to update Google Play services. Now it has version 9.2.56
. I guess it just takes some time for the watch to update Google Play services.
这篇关于Android Wear:Google Play服务已过期。需要9256000,但找到8701534的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!