Android Wear: Google Play services are out of date. Required x, but found y

I have an Android Wear app that I am trying to port from Eclipse to Android Studio. It works (more or less) on my LG G Watch, but when I run it on my Moto 360, I get the following message in the logcat:

GooglePlayServicesUtil﹕ Google Play services out of date.  Requires 6111000 but found 5091534

      

right after Connection to Google API client has failed

. Running on an emulator gives a similar message:

GooglePlayServicesUtil﹕ Google Play services out of date.  Requires 6111500 but found 5077534

      

It seems strange to me that the version is Requires

slightly different in each case, but there you are.

I've looked at similar questions here on SO, and the answers usually boil down to what Gradle dependencies from the Gradle module use play-services-wearable

, not just play-services

. I have checked this and it seems to be correct; here's the relevant section from my build.gradle file:

dependencies {
    compile project(':wearableCommon')
    compile 'com.google.android.support:wearable:+'
    compile 'com.google.android.gms:play-services-wearable:+'
}

      

Note that this wearableCommon

is my own library containing the code that I use in several design-worn projects, and does not use GMS.

I am particularly concerned that this works on one device but not another. If I didn't have my own 360, I could well post this code after testing it on my G Watch. Then I would try to debug it in the wild while doing damage control to hundreds of angry 360 owners at the same time.

+3


source to share


2 answers


The simplest "fix":

Customize play-services-wearable

to watch in 5.0.77

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



Additional Information:

https://plus.google.com/u/0/101581283591300788111/posts/5bHfmjtvQ6R

I literally had the same problem. Wayne is trying to help me. Join the discussion if you like.

+3


source


The latest version of Google Play Services was recently released to Android Wear devices. The latest SDK update for downloadable game services requires an update to your wear, which is displayed in the error message you are reporting. Make sure you have the latest companion app installed on your phone and it will also install the update for your wearable. Make sure you have your wearable paired with your phone, otherwise it won't be able to update the wearable!

If you have your wearable paired with your phone, these things will automatically update and there should be no problem.



I would not recommend hardcoding your build.gradle to 5.0.77, because then you will never update to use the new APIs for Play Services.

+2


source







All Articles