Generate new config file (google-services.json) from: https://developers.google.com/cloud-messaging/android/client#get-config
Newly config file with "api_key": [ { "current_key": XXX } ]
in client section
Update: or manually enabled service in developer console and generate key.
Adding empty current key value in google-services.json file solved this problem for me
"api_key": [{ "current_key": "" }]
Yes, as for the first time using with Firebase, i face like that.Click on your app menu and click "Manage".
you can download google-services.json again.
For everyone that have this issue, for now, you'll need to add any service to your app at https://developers.google.com/cloud-messaging/android/client#get-config
In my case I have added admob (already have analytics and gcm) and then the file was generated with api_key.
I think's it's a bug and will be soon fixed, until that, do it.
Although Jozka Jozin's accepted answer and its comments, Cloud Messaging is neither related nor required.
Nevertheless, re-generating google-services.json
is the key to solution (so I voted him). Below is what I did:
As you know you can generate the config file for Analytics from the Google Developers Guide.
1: Choose your app.
2: Close the popup! It hides...
3: THE OPTION OF ADMOB!
4: Of course, select and enable it!
5: Now we can rightly generate configuration files!
6: We made it! This time, the configuration file should include the api_key appropriately.
Conclusion: The UI of the interactive generation tool is a bit confusing...
You can download the google-services.json
file again.
Steps to download:
1). Click on the top menu in your app in the Firebase
Console.
2). Click on manage.
3). You will find Download the latest config
file option, download and replace the google-services.json
file in your application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With