Android Wear: Google Play services out of date. Requires 9256000 but found 8701534

♀尐吖头ヾ 提交于 2019-12-05 05:08:13

问题


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' to compile '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?


回答1:


I had the same problem today and somehow I managed to overcome it. Things I did:

  • reinstalled Android Wear on the phone (due to this)
  • unpaired the watch from the Android Wear app, then repaired it
  • resynced apps from the Android Wear app a couple of times
  • on the watch, in Settings/About/Versions, I tapped the GMS version a couple of times. It should say 'Checking for updates'. At first there were errors in logcat at this operation, then (after reinstalling, etc.) these disappeared.
  • started Maps and Fit (hoping that they somehow trigger the update)



回答2:


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.




回答3:


You can edit the dependency version:

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

Notice 8.7 instead of 9.2. Also please note that this isnt a fix, its a workaround.

Edit: In a perfect world, all watches will instantaneously update to the latest play services, but that doesnt seem to be the case yet. This is also why I declared this as a workaround rather than a fix.



来源:https://stackoverflow.com/questions/38170179/android-wear-google-play-services-out-of-date-requires-9256000-but-found-87015

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!