Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Default FirebaseApp is not initialized in this process. Make sure to call FirebaseApp.initializeApp(Context) first

Default FirebaseApp is not initialized in this process. Make sure to call FirebaseApp.initializeApp(Context) first.

i have tried with many things but i am not able to Get notifications in devices.

i also tried with below thing.

In the Properties pane, set the Build Action Select google-services.json in the Solution Explorer window.

In the Properties pane, set the Build Action to GoogleServicesJson (if the GoogleServicesJson build action is not shown, save and close the Solution, then reopen it):to GoogleServicesJson

Notification was working before, but after I update the xamarin forms to 2.5.0.280555 and Xamarin.Firebase.Messaging.42.1021.1, it stopped working .

like image 565
User2 Samcom Avatar asked Mar 23 '18 14:03

User2 Samcom


1 Answers

For me, none of the solutions worked that were given anywhere. Only this worked. Just had to downgrade my google services from 4.1.0 to 4.0.0

dependencies {
    classpath 'com.android.tools.build:gradle:3.3.0-alpha08'
    classpath 'com.google.gms:google-services:4.0.0'
    /*classpath 'com.google.gms:google-services:4.1.0' <-- this was the problem */
}

So if you have updated the google services, just try to downgrade or change to an older version. Hope it helps

like image 176
Ammar Bukhari Avatar answered Sep 19 '22 16:09

Ammar Bukhari