In the following website, when registering for Android GCM: https://developers.google.com/mobile/add?platform=android&cntapi=signin&cntapp=Default%20Demo%20App&cntpkg=com.google.samples.quickstart.signin&cnturl=https:%2F%2Fdevelopers.google.com%2Fidentity%2Fsign-in%2Fandroid%2Fstart%3Fconfigured%3Dtrue&cntlbl=Continue%20with%20Try%20Sign-In
The google-services.json file is generated here. This is required on the client side.
How can we generate this file for existing Google Android project?
Adding the JSON File The google-services. json file is generally placed in the app/ directory (at the root of the Android Studio app module).
There is no way to use two google-services. json files in a single Android app. The file name is the same between them and they need to be in the same location. So one will overwrite the other in that case.
I had this same problem today, very frustrating, but I finally found something that worked for me.
The problem with the page you referenced is that your existing projects do not show up in the "Create or Choose an App" dropdown. I had this same issue, even when it showed that I was logged into my google developer account.
I think there is a problem with the session on this page, so it doesn't load your projects. I was able to get it to work when accessing the page through the console help feature.
This is how I did it. It seems illogical, but stick with me:
Type "google-services.json" into the Help feature search bar and press enter.
Click on the help item titled "Set up a GCM Client App on Android"
Now, this is where it starts to seem illogical, because you're going to go to the same pages that didn't work for you before, but stick with me.
This button is going to take you to the exact same page you referenced in your question. However, your list of current apps should appear in the "Create or Choose and App" dropdown.
This worked for me, I hope it works for you.
WARNING: When I did this, it changed my API Key. My project number and other info stayed the same, but my API Key changed. So if you have projects that depend on your existing API key, you'll have to deal with the consequenses.
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