Issue
I am using google Maps in my android application. I have created the key and added necessary permissions in manifest file. But soon I start the application I get this message in debugger:
GoogleService failed to initialize, status: 10, Missing an expected resource: 'R.string.google_app_id' for initializing Google services. Possible causes are missing google-services.json or com.google.gms.google-services gradle plugin.
I am not sure whats wrong. The Map is working fine and I can use it without any issues. My gradle file has this entry:
compile 'com.google.android.gms:play-services:8.4.0'
What is it complaining about and how do I alleviate it?
Solution
You need to place the configuration file (google-services.json
) generated by developer.google.com, as mentioned in the 2nd step of the official docs here
The process is simple
- You can select your project or create a new one.
Then after selecting desired services (in this case the maps service), you can generate the configuration file.
For people who have migrated to the Firebase projects they can get the same by going to Firebase Console, selecting your project and under settings you will find the configuration file.
Then as quoted in step 3 of the official docs here
Copy the
google-services.json
file you just downloaded into the app/ or mobile/ directory of your Android
P.S : For people downvoting this answer, please do leave a comment as to why you are down voting it.
Answered By - Nishant Srivastava
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.