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!
In the Firebase console, open the Authentication section. In the Sign in method tab, enable the Phone provider if you haven't already. Open the Phone numbers for testing accordion menu. Provide the phone number you want to test, for example: +1 650-555-3434.
Don't forget to go in Firebase Project Settings > App check > and Register firebase project in SafetyNet and Play Integrity register with default time token 1 hour and u will remove reCaptcha from phone auth OTP! That's awesome.
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.
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
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 !
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With