Cannot set up firebase on android react native 0.60.3
Issue
I tried to set up firebase for my React native app version 0.60.0 but I ran into bugs on android. Anyone made it work, please help me out.
Project Files
iOS
Click To Expand
ios/Podfile:
- [ ] I'm not using Pods
- [x] I'm using Pods and my Podfile looks like:
# N/A
AppDelegate.m:
// N/A
Android
Click To Expand
Have you converted to AndroidX?
- [ ] my application is an AndroidX application?
- [ ] I am using
android/gradle.settingsjetifier=truefor Android compatibility? - [ ] I am using the NPM package
jetifierfor react-native compatibility?
android/build.gradle:
classpath 'com.google.gms:google-services:4.2.0'
android/app/build.gradle:
implementation "com.google.android.gms:play-services-base:16.1.0"
implementation "com.google.firebase:firebase-core:16.0.9"
implementation "com.google.firebase:firebase-messaging:18.0.0"
implementation 'me.leolin:ShortcutBadger:1.1.21@aar'
apply plugin: 'com.google.gms.google-services'
android/settings.gradle:
// N/A
MainApplication.java:
protected List
AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<application
android:name=".MainApplication"
android:label="@string/APP_NAME"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/APP_NAME"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize"
android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<receiver android:name="io.invertase.firebase.notifications.RNFirebaseNotificationReceiver"/>
<receiver android:enabled="true" android:exported="true" android:name="io.invertase.firebase.notifications.RNFirebaseNotificationsRebootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.QUICKBOOT_POWERON"/>
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
<service android:name="io.invertase.firebase.messaging.RNFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service android:name="io.invertase.firebase.messaging.RNFirebaseBackgroundMessagingService" />
</application>
Environment
Click To Expand
react-native info output:
OUTPUT GOES HERE
- Platform that you're experiencing the issue on:
- [ ] iOS
- [ ] Android
- [ ] iOS but have not tested behavior on Android
- [ ] Android but have not tested behavior on iOS
- [ ] Both
react-native-firebaseversion you're using that has this issue:e.g. 5.4.3
Firebasemodule(s) you're using that has the issue:e.g. Instance ID
- Are you using
TypeScript?Y/N
Think react-native-firebase is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]
- 👉 Check out
React Native FirebaseandInvertaseon Twitter for updates on the library.

Sure, just clone this repo https://github.com/mikehardy/rnfbdemo and run RNVERSION=60 ./make-demo.sh - works
The problem you are having is you didn't use compatible versions https://rnfirebase.io/docs/v5.x.x/getting-started#Supported-versions---React-Native-/-Firebase
v5.4 + AndroidX -> no go (well maybe no go) v5.4 + new firebase SDK libraries -> definitely no go
Sure, just clone this repo https://github.com/mikehardy/rnfbdemo and run
RNVERSION=60 ./make-demo.sh- worksThe problem you are having is you didn't use compatible versions https://rnfirebase.io/docs/v5.x.x/getting-started#Supported-versions---React-Native-/-Firebase
v5.4 + AndroidX -> no go (well maybe no go) v5.4 + new firebase SDK libraries -> definitely no go
this repo is not working for rn 0.60.4 . the build fails
Which build @creative-git ? I just updated it recently and it was working for me. Maybe open an issue + PR on that repo
@creative-git - maybe it was an iOS build you had issues with, I had finished updating rnfbdemo for RN60+Android but wasn't quite done with iOS. It's fully updated / and appears to work for me now? https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh
@mikehardy , i tested it on ios. didn't try it on android after that. with RNFB v6 still in alpha, and RN 0.60 autolinking , lot of developers facing issues integrating RNFB with RN. It will be great if the documentation of either v5 or v6 has some clear installation steps on RN 0.60
I agree - PRs are welcome, there's an edit button on every documentation page