My Xamarin.Android app Crashes after the user opens up the app, I beleive it has something to do with Firebase but I have not been able to figure it out. Can you please let me know if you have any suggestions on how to fix this error?
FirebaseInstanceId.get_Instance () Java.Lang.IllegalStateException: Default FirebaseApp is not initialized in this process "App Name" Make sure to call FirebaseApp.initializeApp(Context) first.
JniEnvironment+StaticMethods.CallStaticObjectMethod (Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) JniPeerMembers+JniStaticMethods.InvokeObjectMethod (System.String encodedMember, Java.Interop.JniArgumentValue* parameters) FirebaseInstanceId.get_Instance () NewUpdateActivity.RunRegistration (System.Collections.Generic.List`1[T] categories) AsyncMethodBuilderCore+<>c.b__7_1 (System.Object state)
Check if your google-services.json File build Action is GoogleServiceJson if it doesn't work try to initialize your Firebase by yourself in onCreate method before calling any Firebase code.
Here is the manual configuration of Firebase.
var options = new FirebaseOptions.Builder()
.SetApplicationId("<AppID>")
.SetApiKey("<ApiKey>")
.SetDatabaseUrl("<DBURl>")
.SetStorageBucket("<StorageBucket>")
.SetGcmSenderId("<SenderID>").Build();
var fapp = FirebaseApp.InitializeApp(this, options);