Ensure that the "Google Maps Android API v2" is enabled. I am getting this error when I try to Implement Google Maps
I am working on google maps and I am getting this error. I had done the following things:
Got My sha1 fingerprint.
Registered my project and got my project key.
I don't know to how to get Google Maps Android API v2 enable because all the links I have tried are old and Google had changed it's site design. Please help me. I already have wasted a lot of time on this.
My Logcat:
Authorization failure. Please see developers.google.com/maps/documentation/android-api/start for how to correctly set up the map.
E/Google Maps Android API: In the Google Developer Console (console.developers.google.com)
Ensure that the "Google Maps Android API v2" is enabled.
Ensure that the following Android Key exists:
API Key: AIzaSyBK8rKr9lCRLhzv68I4Q26G9pHHO******
Solution 1:
From error it is clear that You did not enable google map api for android. To enable,
- Login google developer console
- Select Library option from left side panel.
- Now you can see all API list and go to Google Maps APIs and select Google Maps Android API .
- Now you can see option to enable/disable API. Enable it.
I hope it help you.
Solution 2:
Actually I had the same problem as well. my application runs and the map is blank!
First of all check whether you have installed Google Play in you android mobile.
actually I had the problem in API Key restrictions
Google Developer Console
- Login to Developer Console.
- In your Dashboard Navigation Menu.(left side)
- Select API & Services > Credentials.
- So you will be redirected to Credentials page were you can view all the API keys that you created (https://console.cloud.google.com/apis/credentials)
- Identify your Project API key and click on Edit Api Key.
- Under that you can see the Key restrictions
- From there remove all Application restrictions and Api restriction.
On your Android Mobile
- Uninstall the App.
Android Studio
- Build > Clean Project.
- Build > Rebuild Project.
- Run IT
This steps worked for me perfectly.
- Reference GitHUb , Google Issue Tracker