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

后端 未结 4 976
遇见更好的自我
遇见更好的自我 2020-12-03 07:13

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 Pla         


        
相关标签:
4条回答
  • 2020-12-03 07:44

    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.

    0 讨论(0)
  • 2020-12-03 07:44

    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 !

    0 讨论(0)
  • 2020-12-03 08:02

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

    0 讨论(0)
  • 2020-12-03 08:08

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

    0 讨论(0)
提交回复
热议问题