4

I do not understand why I get this message:

Google Play services out of date. Requires 10298000 but found 10084470

In my gradle I compile the version 10.2 of google maps. Here are all my dependencies:

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.1.1'
    compile 'com.android.support:design:25.1.1'

    compile 'com.android.support:appcompat-v7:25.2.0'
    compile 'com.android.support:design:25.2.0'
    compile 'com.jakewharton:butterknife:7.0.1'

    compile 'com.stormpath.sdk:stormpath-sdk-android:1.1.3'
    compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.5'

    compile 'com.android.support:cardview-v7:25.2.0'
    compile 'com.android.support:support-v4:25.2.0'

    compile 'com.squareup.okhttp3:okhttp:3.2.0'

    compile 'com.google.android.gms:play-services-maps:10.2.0'
    compile 'com.google.android.gms:play-services-location:10.2.0'

    compile 'com.android.support:preference-v7:25.2.0'
    compile 'com.android.support:recyclerview-v7:25.2.0'
    compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
    testCompile 'junit:junit:4.12'
}
0xtuytuy
  • 1,494
  • 6
  • 26
  • 51

3 Answers3

18

Are you using an emulator? If so, create a new emulator using API Level 25 or downgrade the version of google play services in your gradle to 9.6.0.

ayz4sci
  • 2,220
  • 1
  • 16
  • 17
  • I downgraded to 9.6.0 and it worked ... Why is that ? – 0xtuytuy Mar 05 '17 at 16:52
  • 1
    It's looking for the latest google play services version, which your emulator doesn't have. – ayz4sci Mar 05 '17 at 16:54
  • So much noise on other similar SO questions. This one is a perfect answer. – Suhas Mar 31 '17 at 14:19
  • Sadly got the same error message with API level 25 (rev 3). Bud don't want to downgrade (needs stuff from new version), so had to wait until Google updates the images.. – Totoo Apr 20 '17 at 12:03
  • If you're getting this error on a real device, you probably need to force play services to update on the device - see this answer: https://stackoverflow.com/a/51271596/1103584 – DiscDev Jul 11 '18 at 17:42
2

This answer https://stackoverflow.com/a/45312782/1544046 worked out better for me. Basically, on the emulator, you can update GPS (FYI You will have to login with a Google account).

JCricket
  • 1,318
  • 2
  • 17
  • 34
0

If you have a pre 2.0 Wear OS device, you need to use the "Wear OS" app on the mobile device to force play services to update on your watch. Fortunately, the process is simple (but VERY hard to find how to do online).

    1.) Open the Wear OS app on your phone
    2.) Scroll down and tap "Advanced Settings"
    3.) Tap "Resync apps"
    4.) Resync apps will grey out - once it's enabled again
    5.) Grab your paired watch and go to Settings -> About -> Versions, Tap on Versions
    6.) Play Services is up to date!

So simple, yet so frustrating.

DiscDev
  • 38,652
  • 20
  • 117
  • 133