25

I am making an android app with Firebase. These are the lines causing problems:

dependencies {
    compile 'com.google.firebase:firebase-core:10.0.1'
    compile 'com.google.firebase:firebase-auth:10.0.1'

I get this error:

Google Play services out of date.  Requires 10084000 but found 9879470. 

I run the app on an emulator. It doesn't seem possible to update GPS on the emulator, since it doesn't have Google Play Store.

In SDK Manager, it says the version of Google Player services is 38.

There is no apparent way to update this either.

Bjørn Skagen
  • 433
  • 1
  • 4
  • 5

2 Answers2

35

Updated 28 Feb 2017: Rev 4 of the emulator images for API 25 has been released and is available for download. It contains Google Play Services 10.2.98, which supports Firebase 10.2.0.


An emulator system image that supports Firebase 10.0.1 has not yet been released for API 25. The Rev 19 system image for API 23 does support 10.0.1.

You have three options:

  1. Wait for release of an API 25 emulator system image that supports 10.0.1
  2. Create an emulator device using Rev 19 of the API 23 system image. In the Standalone SDK Manager, the emulator images are grouped by API and have names like, "Google APIs...System Image". Make sure you have Rev 19 installed.
  3. In your build, downgrade to a previous version of Firebase to allow use of the API 25 emulator image.

When running the emulated device, you can see the version of Google Play Services installed by going to Settings > Apps and selecting Google Play Services.

Bob Snyder
  • 37,759
  • 6
  • 111
  • 158
  • Thank you. I tried changing the version in gradle from 10.0.1 to the version given in Settings > Apps > Google Play Services. It gives an error, can't find this version. – Bjørn Skagen Dec 12 '16 at 17:33
  • @B Yes, there seem to be different schemes for assigning version numbers. Try downgrading your Firebase and Play Services libs to 9.8.0. – Bob Snyder Dec 12 '16 at 17:38
  • Thank you, that worked. Can you explain why that exact version works and not other arbritrary versions? – Bjørn Skagen Dec 12 '16 at 19:11
  • 2
    You should be able to use 9.8.0 or any of the [prior versions](https://developers.google.com/android/guides/releases): 9.6.1, 9.6.0, 9.4.0, etc. – Bob Snyder Dec 12 '16 at 20:40
11

I just solved it by changing the version of the dependencies. just use:

compile 'com.google.firebase:firebase-core:9.6.0'
compile 'com.google.firebase:firebase-auth:9.6.0'
ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96
James Norman
  • 505
  • 5
  • 14