How to enable “Google Maps Android API v2” in developers console

北城以北 提交于 2019-12-18 12:27:36

问题


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:

  1. Open your console (console.developers.google.com)
  2. Select Credentials from left
  3. Click on your API key
  4. Click on API Restrictions under Key Restrictions
  5. Click on Select API and
  6. "Maps SDK for Android" to your API Restrictions list
  7. "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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!