I am trying to run an existing react native app on android platform and I am getting the error as in the below image. I have already followed all the steps mentioned under http://invertase.link/android, but I still am facing this error.
I am a complete beginner in react native, have already exhausted all the solutions available on the web and this post is my last resort.
You have to add import io.invertase.firebase.RNFirebasePackage;
and new RNFirebasePackage()
in the MainApplication.java
In my case I deleted my app from emulator and reinstall that by giving the command (react-native run-android) and that process worked for me.
I had this same exact issue, and the underlying issue was that Invertase's starter project was already ejected from Expo and utilizing native modules. Expo was unable to link those. To integrate Firebase in Expo, I redid my project using create-react-native-app
, copied all the source JS files over, then followed this guide, doing npm install --save firebase
. I had to reinstall all the dependencies again with npm, but integrating Firebase was much easier.