Closed dariakoko closed 4 years ago
I see a couple things, you've still got the android support libraries vs AndroidX libraries in your app/build.gradle, and some of the versions are out of date (google plugin at least, likely the firebase ones - highly suggest converting to the 'bom' style - you can google it to see how it works, it's helpful). I see the react-native CLI auto-linking include and apply in app/build.gradle so auto-linking should be working.
in general it is very difficult to debug these project integration issues, so what I do instead is provide a script with comments that demonstrates each step necessary to integrate RNFB to an app, here's the one for RNFBv5 + RN0.60+ https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh - my normal advice is to clone that repo, run the script, then carefully examine the files it generated vs your project files to find the difference - the root cause will be in the difference somewhere
@mikehardy Thank you for the fast reply! I will test it one more time (I already tried out you script and it didn't help) and let you know the results :)
@mikehardy created project requires google-services.json file, but I didn't use this file before update. Is it possible to avoid using it somehow?
it is maybe possible but not easy to avoid using google-services.json. I would not avoid it, I would use it. If you avoid it then you have to all sorts of runtime configuration etc before you touch any RNFB APIs (maybe possible? maybe not - RNFB itself might try to do things during it's initialization) and that would explain why you receive the error message in this issue
I see a couple things, you've still got the android support libraries vs AndroidX libraries in your app/build.gradle, and some of the versions are out of date (google plugin at least, likely the firebase ones - highly suggest converting to the 'bom' style - you can google it to see how it works, it's helpful). I see the react-native CLI auto-linking include and apply in app/build.gradle so auto-linking should be working.
in general it is very difficult to debug these project integration issues, so what I do instead is provide a script with comments that demonstrates each step necessary to integrate RNFB to an app, here's the one for RNFBv5 + RN0.60+ https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh - my normal advice is to clone that repo, run the script, then carefully examine the files it generated vs your project files to find the difference - the root cause will be in the difference somewhere
Thank you, these scripts are very handy.
I'm comparing the results using the make-demo-v6.sh and I don't see any of the steps in the android project but I see that you added project.ext{set('react-native',[versions:[firebase:[bom:'24.4.0'],],])}
I just wondering why? Aren't the Android steps not required? https://invertase.io/oss/react-native-firebase/v6/crashlytics/android-setup
thank you
I like to have complete control over versioning, and I wanted to demonstrate the same, so in the demo script I override the version of the Firebase SDK that react-native-firebase specifies as an internal default with one of my choosing. This is a double-edged sword because maybe then my firebase sdk and react-native-firebase aren't compatible - that's the risk of not using the default - but since I do maintenance on the package when I have time I'm okay accepting that risk in return for being able to use new versions of the sdk when they come out. Hope that clears up why I did that
Note that right at this moment the v6 demo script is surfacing some problem with the latest release - no root cause as of yet - but it fails to compile on android, so careful with that
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?
This issue will be closed in 15 days if no further activity occurs. Thank you for your contributions.
Hello @mikehardy Thanks a lot for your help! I fixed the issue by updating android folders. Used several lines of your script, running the script as it is was too much for my project
sorry for the late reply
The [[DEFAULT]] firebase app has not been initialized! RN 0.60.3 react-native-firebase 5.5.7
Hello! I know that there are already a lot of issues like this on GitHub, but still, non of them helped me to solve my issue...
I updated react-native from 0.59.9 to 0.60.3. Soooo it means that I have to upgrade and react-native-firebace too to the version that support AndroidX. So, I updated it from 5.2.2 to 5.5.7 and now facing this issue on Android.
If you notice that something else, not connected to firebase, is wrong, let me know, pleaseeeeee
Thank you in advance!
react-native 0.60.3 react-native-firebase 5.5.7
app/build.gradle
android/build.gradle
settings.gradle
MainApplication.java
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]React Native Firebase
andInvertase
on Twitter for updates on the library.