. Advertisement .
..3..
. Advertisement .
..4..
What is happening? I recieved a message that had a few exceptions with “default firebaseapp is not initialized in this process”.
Here is the details:
Default FirebaseApp is not initialized in this process com.example.app. Make sure to call FirebaseApp.initializeApp(Context) first.
I need your help. Thank you very much.
The cause: I can see the error that the stack trace looks like this:
You”re using Firebase 9.6.1, and you”re also using the following Firebase components:
You shouldn’t have to do any manual initialization in our case, based on the documentation and Javadoc. On a range of devices, the exception occurs on Android 4-6.
The solution: I have some solution for you.
1.Make sure to include it in your build.gradle file at the root level.
Then, at the bottom of your module level Gradle file (typically app/build.gradle), add the ‘apply plugin’ line to enable the Gradle plugin:
According to the documentation. I experienced the same issue as the questioner above when I neglected to add this to my Gradle scripts.
2.I experienced the same problem a long time ago.You are attempting to access a Firebase instance without initializing it. In your main function or a FutureBuilder, please include the following piece of code before attempting to get an instance of Firebase:
3.
google-services:4.1.0
appears to be having a problem. Reduce the rating toAlternatively it could be upgraded to:
4.I didn’t have the line below in my app/build.gradle file.
After that, clean the project and run it again. That made it work for me. It’s my suggestion for you. Good luck for you!!