Ensure that the “Google Maps Android API v2” is enabled. I am getting this error when I try to Implement Google Maps

后端 未结 11 1695
执笔经年
执笔经年 2020-11-29 03:39

I am working on google maps and I am getting this error. I had done the following things:

  1. Got My sha1 fingerprint.

  2. Registered my project and

相关标签:
11条回答
  • 2020-11-29 04:30

    I encountered this problem when I opened my project with Android Studio on a different computer. Updating SHA-1 solved the problem.

    Linux/MacOS

    keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
    

    Windows

    keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
    
    0 讨论(0)
  • 2020-11-29 04:31

    In Android Error show its self mistake.

    In Your Error Its show error to check first V2 google map API is ON in google developer Console.

    just open google developer console and you just have to on this API and some configuration need have to do there for access map.

    you can see process and more details from here.

    Working With V2 Google Map

    0 讨论(0)
  • 2020-11-29 04:32

    From error it is clear that You did not enable google map api for android. To enable,

    1. Login google developer console
    2. Select Library option from left side panel.
    3. Now you can see all API list and go to Google Maps APIs and select Google Maps Android API .
    4. Now you can see option to enable/disable API. Enable it.

    I hope it help you.

    0 讨论(0)
  • 2020-11-29 04:36

    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

    1. Login to Developer Console.
    2. In your Dashboard Navigation Menu.(left side)
    3. Select API & Services > Credentials.
    4. 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)
    5. Identify your Project API key and click on Edit Api Key.
    6. Under that you can see the Key restrictions
    7. From there remove all Application restrictions and Api restriction.

    On your Android Mobile

    1. Uninstall the App.

    Android Studio

    1. Build > Clean Project.
    2. Build > Rebuild Project.
    3. Run IT

    This steps worked for me perfectly.

    • Reference GitHUb , Google Issue Tracker
    0 讨论(0)
  • 2020-11-29 04:37

    Another reason can be that the relative path of secure.properties in the build.gradle is wrong. Check it just in case.

    0 讨论(0)
提交回复
热议问题