The Android emulator I am using has Google Play Services 10.9.30 (from Settings -> Apps -> App Info -> Google Play Services). The setup instructions ask the user to link v11.0.0 of the Firebase libs, which gives the error "[app-name] won't run unless you update Google Play Services" - which can only be done by updating the API version of the emulator to the latest one (API 26 at the moment).
I got my app running by replacing:
android/app/build.gradle
compile "com.google.firebase:firebase-core:11.0.0"
compile "com.google.firebase:firebase-auth:11.0.0"
compile "com.google.firebase:firebase-crash:11.0.0"
compile "com.google.firebase:firebase-database:11.0.0"
compile "com.google.firebase:firebase-messaging:11.0.0"
compile "com.google.firebase:firebase-storage:11.0.0"
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
with:
android/app/build.gradle
compile "com.google.firebase:firebase-core:10.0.1"
compile "com.google.firebase:firebase-auth:10.0.1"
compile "com.google.firebase:firebase-crash:10.0.1"
compile "com.google.firebase:firebase-database:10.0.1"
compile "com.google.firebase:firebase-messaging:10.0.1"
compile "com.google.firebase:firebase-storage:10.0.1"
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
Note that Firebase:Perf does not work with this setup.
Can we have this documented?
You can login to the play store in your simulator and update google play services.
Downgrading the version of firebase not the right solution.
Do not downgrade your firebase.
If client have old play services, they have to update to latest version
@akshetpandey there is no Google Play Store in Android Emulator (7.1, API 26). I tried many ways to upgrade it but there seems to be no solution.
You can try using Android Studio 3, you can build the emulators with the
play store installed. Then just ensure Google Services is running the
latest update.
On 30 Jun 2017 7:51 am, "Ashish Chaudhary" notifications@github.com wrote:
@akshetpandey https://github.com/akshetpandey there is no Google Play
Store in Android Emulator (7.1, API 26). I tried many ways to upgrade it
but there seems to be no solution.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/invertase/react-native-firebase/issues/216#issuecomment-312189930,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAzZXtLJDwmEivgVi4qO9yiBP-v1riPiks5sJJregaJpZM4OJjvu
.
This seems to be possible in Android Studio 3. Thanks.
I'll get something added to the docs.
I've just gone through this process and had a couple of quetions/comments:
Most helpful comment
You can login to the play store in your simulator and update google play services.
Downgrading the version of firebase not the right solution.