21

I'm trying to use the Firebase Auth service with email and password. When I click on register I got an alert on the emulator that says :

"Update Google Play services : Firebase Auth won't run unless you update Google Play services"

When I look in the logs, I can read those 2 lines :

DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
GooglePlayServicesUtil: Google Play services out of date. Requires 9256000 but found 9080480 

In the SDK Manager, Google Play services are up to date. I suspect it's a problem with the emulator, which somehow isn't up to date.

The emulator I'm using : Nexus 5X API 21 (with Google API)

Any idea? Thanks!

raphh
  • 618
  • 2
  • 8
  • 22

4 Answers4

28

In your post you say, In the SDK Manager, Google Play services are up to date.

The version of Google Play Services shown in the Extras section at the bottom of the Standalone SDK Manager has no effect on the version used by an emulator. The emulators run on system images configured to contain some particular version of Play Services, which is not always the latest.

You should confirm that you have downloaded the latest emulator images. These are listed in the Standalone SDK Manager under each API level and have names that end with System Image. Double check that you have downloaded the lastest versions of the Goggle APIs...System Image files. You will then need to recreate your emulator to use the updated image.

Until I saw your question, I did not have the latest versions and tried running Firebase Auth 9.0.2 on a Nexus 5X API 21 emulator. It failed with a message similar to what you reported. I then downloaded the latest image (rev 12) and am now able to run successfully.

Bob Snyder
  • 37,759
  • 6
  • 111
  • 158
  • Thanks for these precisions. I didn't know that. I installed the Google API System Image in the Standalone SDK Manager as you mentionned for API 23, 22 and 21, then recreated an emulator but it's still not working. Here's a copy of my logs, in case you can help me debug this. http://pastebin.com/aY4dJrVh Thanks! – raphh Jun 30 '16 at 18:09
  • 1
    Am I right that you are building your app with Firebase version 9.2.0? It seems to require Google Play Services 9.2.56, which is not available in the API 21 emulator image I tried. I think your only options are to downgrade to Firebase 9.0.2 or wait for release of new emulator images that contain GPS 9.2.56. – Bob Snyder Jun 30 '16 at 18:26
  • Is there a place I can go to browse the full version history of the firebase for android libraries? They don't seem to be listed on the bintray/jcenter website. – Ankur Jun 30 '16 at 18:54
  • @Ankur: I don't know. – Bob Snyder Jun 30 '16 at 18:57
  • 1
    I switched on the Firebase 9.0.2 and it seems to work with API 21 emulator. Thank you @qbix for your help! – raphh Jun 30 '16 at 20:55
8

best way for future problems like this is .

open you emulator go to settings > apps > Google Play Services

you will find witch version your AVD is using

play_services_version

now that you know the number your AVD is using just use any

version equal or bellow in your gradle

dependencies {

    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:24.0.0'
    compile 'com.android.support:design:24.0.0'
    // Fire base
    compile 'com.google.firebase:firebase-auth:9.0.1'
    compile 'com.google.firebase:firebase-database:9.0.1'
    compile 'com.google.android.gms:play-services-auth:9.0.1'
}

apply plugin: 'com.google.gms.google-services'

this work for me , i hope it helps !

Pugazh
  • 9,453
  • 5
  • 33
  • 54
Adliano Alves
  • 311
  • 2
  • 6
  • 1
    This answer would be improved if you copy and pasted the text from build.gradle into a code block. That way others could see it immediately, copy and paste it, and it wouldn't link rot. – Noumenon Jul 06 '16 at 21:06
  • Does it mean that my app with com.google.firebase:firebas-.auth:11.0.1 version won't working on devices with Google Play Services 9.0.1??? – valerybodak Jun 30 '17 at 20:06
  • 1
    this is for AVD : Firebase Auth not working - 'Update Google Play services' msg on the "emulator" – Adliano Alves Jul 30 '17 at 18:37
0

I solved this problem by updating Google Play services. Initially at 8.0 and I updated it to 11.0.

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
-1

Just go t manifest.xml and gradle build set minSDKversion to 15..i have solved my problem with this.

Shweta
  • 11
  • 5