Firebase Auth not working - 'Update Google Play services' msg on the emulator (Android)

16,652

Solution 1

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.

Solution 2

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 !

Share:
16,652
raphh
Author by

raphh

Updated on June 06, 2022

Comments

  • raphh
    raphh about 2 years

    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!