Default FirebaseApp is not initialized
I had this same issue some time ago.
You're trying to get an instance of Firebase without initialize it.
Please add this line of code before you try to get an instance of Firebase, in your main function or a FutureBuilder:
FirebaseApp.initializeApp();
Default FirebaseApp is not initialized in this process ... Make sure to call FirebaseApp.initializeApp(Context) first
I used multi-module in this project. id com.google.gms.google-services
to app directory and solved.
java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process com.example.bottomnav
You probably did not add the google-services plugin to your build.gradle. It's more than just a dependency. According to the documentation, you also have to add:
apply plugin: 'com.google.gms.google-services'
Java.Lang.IllegalStateException Default FirebaseApp is not initialized
I finally figured it out, I just had to follow the steps here:
Default FirebaseApp is not initialized in this process. Make sure to call FirebaseApp.initializeApp(Context) first
Side note: for step 2, this other article explains how to do it:
https://forums.xamarin.com/discussion/175159/i-didnt-find-googleservices-json-in-the-build-action
Default FirebaseApp is not initialized in this process. Make sure to call FirebaseApp.initializeApp(Context) first
Make sure:
- Package name in
AndroidManifest.xml
is identical to one in thegoogle-services.json
google-services.json
build action is set toGoogleServicesJson
- After step 2 restart your IDE & clean & rebuild
- Explicitly call
FirebaseApp.InitializeApp(Application.Context);
inMainActivity.OnCreate
just before theLoadApplication(..)
Related Topics
Android Camera Intent: How to Get Full Sized Photo
Push Notifications on Content Change
How to Parse the Androidmanifest.Xml File Inside an .Apk Package
How to Use Scrollview in Android
Set Up Device For Development (? No Permissions)
How to Customize a Progress Bar in Android
Why Does Layoutinflater Ignore the Layout_Width and Layout_Height Layout Parameters I'Ve Specified
How to Make the Corners of a Button Round
Getcolor(Int Id) Deprecated on Android 6.0 Marshmallow (API 23)
Context.Startforegroundservice() Did Not Then Call Service.Startforeground()
Error:(1, 0) Plugin With Id 'Com.Android.Application' Not Found
How to Hide Soft Keyboard on Android After Clicking Outside Edittext
Animate Change of View Background Color on Android
Taking Picture from Camera Without Preview
Android: Move a View on Touch Move (Action_Move)
The Setmobiledataenabled Method Is No Longer Callable as of Android L and Later