问题
I have developed an application to display my location on google map. When I run the program, its showing the below error.
But I couldn't find a way to enable "Google Maps Android API v2". I have found a question on the same. I am not quiet clear on how to follow that step.
Could you please help me solve this?
回答1:
In the developer console go to API Manager
Fist you will need some some API Keys.
- Go to Credentials.
- Select Create credentials and choose "API key" and "Android key".
- In the next screen put any name for your credential.
- In the +Add package name fingerprint write your package name (com.sourcey.materialwhatever) and the fingerprint that appears in your log (E4:...:B9).
Now from the API Manager go to Overview
- Look for "Google Maps Android API" and enable it.
You probably got a debug keystore when you installed android sdk, with it you could check your fingerprint using the command: ($HOME/.android/debug.keystore is the default location)
keytool -list -v -keystore .android/debug.keystore
http://developer.android.com/intl/es/tools/publishing/app-signing.html
回答2:
Nothing else worked for me, but this solved my problem:
- Open your console (console.developers.google.com)
- Select Credentials from left
- Click on your API key
- Click on API Restrictions under Key Restrictions
- Click on Select API and
- "Maps SDK for Android" to your API Restrictions list
- "Save"
回答3:
It takes > 5 minutes after enabling the google map API.
来源:https://stackoverflow.com/questions/35371754/how-to-enable-google-maps-android-api-v2-in-developers-console