3

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:

Huawei Nexus 6P anglerLG G Watch LGW100

(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?

Thomas Vos
  • 12,271
  • 5
  • 33
  • 71

4 Answers4

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)
1

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.

Thomas Vos
  • 12,271
  • 5
  • 33
  • 71
  • a few days? :( Could you say how many? – Dennis Anderson Dec 22 '21 at 19:32
  • @DennisAnderson I don't remember exactly how long it took. However, you can manually install the latest Google Play services APK using ADB. You can find the APKs on APKMirror: https://www.apkmirror.com/apk/google-inc/google-play-services-android-wear/ – Thomas Vos Dec 22 '21 at 19:37
  • I did update it manually - and that worked, but it broke the WiFi connection with my phone somehow and play store was gone etc etc - I did updated it to the latest greatest - perhaps I shouldn't do that as well :P – Dennis Anderson Dec 24 '21 at 09:55
0

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.

zoltish
  • 2,122
  • 19
  • 37
  • Could you please explain why I need to use such an old version of Google Play Services? My app wouldn't even compile, because I use new methods. And what do you mean by "workaround"? – Thomas Vos Jul 03 '16 at 13:07
  • @SuperThomasLab See my edited answer. I dont know the exact reason, but Im guessing that they should update and that its a bug. 99,9% of watches that my app is running on are up to date, but oh that 0,1%. – zoltish Jul 03 '16 at 13:16
  • I understand, however, I don't want a "workaround" that uses an older version. And I already wiped the watch about 5 times now. Why doesn't it update? – Thomas Vos Jul 03 '16 at 13:17
  • @SuperThomasLab I understand that, and I dont know why it doesnt update - my best guess is that its a bug in the Android Wear OS. Whenever one of my users run into this it eventually gets updated, although it may take up to a day or two. – zoltish Jul 03 '16 at 13:23
  • In the screenshot of the handheld device you can see that I already have the newest version. I just don't understand why it doesn't update. Are there any way to force the watch to install the update. The phone is rooted, and if needed I can root the watch. – Thomas Vos Jul 03 '16 at 13:27
  • @SuperThomasLab Like I said, I dont know why the watch doesnt update. Hopefully its a bug and theyre working on a fix for it already. I also dont know if rooting helps, but if you plan on releasing your app for others then know that there will be instances where the watch play services isnt up to date like in your case, thus rooting may fix it locally but it might still happen to others - until it gets officially fixed. – zoltish Jul 03 '16 at 13:38
  • Just to be sure.. If I use an old version in the Android Wear module, can I still use the latest version in the Mobile module? – Thomas Vos Jul 03 '16 at 14:27
  • When I use the older version it gives an error: `failed to resolve: com.google.android.gms:play-services-wearable:8.7.0`. The install button doesn't do anything. – Thomas Vos Jul 03 '16 at 14:52
  • 1
    Two suggestions: (1) In your android-sdk directory, look in \extras\google\google_play_services to see what versions you have installed, and use one of those rather than 8.7. (2) In your Android Wear app on the phone, go to Settings for your watch and Resync Apps. This _should_ update GMS on the watch, though it takes quite a while to work through all apps; you can monitor its progress in logcat on the watch. – Sterling Jul 03 '16 at 19:49
  • @String Thank you for your suggestions. (1) How can I see which versions I have installed? I don't see anything special in the directory: http://imgur.com/a/Zce86. (2) The Resync Apps button doesn't update Google Play services. It should have finished already because I left it going for about 12 hours. – Thomas Vos Jul 04 '16 at 12:30
0

Another option is to manually upgrade Google Play services via odb:

  • download latest Google Play services apk (from here)
  • install it via adb install -r com.google.android.gms*

My watches (Samsung Gear S with Wear 1.5) had extremely old version of Google Play services after factory reset (same as yours: 8.7.01 - 534) and did not install any application after pairing. Manually updating play services solved that.

ElDorado
  • 448
  • 6
  • 19