How to enable “Google Maps Android API v2” in deve

2019-02-13 16:03发布

问题:

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