In my react native aoolication I am trying to use Firebase FCM. But I got this error. Here it mentioned to import somethings in MainApplication.jsvs. But i do not have .java file, There I have MainApplication.kt.
Can someone help me to solve it?
`ERROR Error requesting Firebase permissions: [Error: You attempted to use a firebase module that’s not installed on your Android project by calling firebase.app().
Ensure you have:
-
imported the ‘io.invertase.firebase.app.ReactNativeFirebaseAppPackage’ module in your ‘MainApplication.java’ file.
-
Added the ‘new ReactNativeFirebaseAppPackage()’ line inside of the RN ‘getPackages()’ method list.
See http://invertase.link/android for full setup instructions.]
at App (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.myride&modulesOnly=false&runModule=true:160370:26)
at RCTView
at View (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.myride&modulesOnly=false&runModule=true:60550:43)
at RCTView
at View (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.myride&modulesOnly=false&runModule=true:60550:43)
at AppContainer (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.myride&modulesOnly=false&runModule=true:60392:36)
at myride(RootComponent) (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.myride&modulesOnly=false&runModule=true:111487:28)`
I tried to solve this issues by using github issues and Stack over flow solutions. But didn’t work. I am a begginer to the react native.