Google Maps API V2 'Failed to Load Map. Could not contact Google Servers'

后端 未结 10 1072
礼貌的吻别
礼貌的吻别 2020-11-27 21:08

I have checked and double checked my APIkey that I registered on the Google Console however I am still getting the following error:

12-05 16:31:12.940: E/Goo         


        
相关标签:
10条回答
  • 2020-11-27 21:36

    You might have enabled the wrong service "Google Maps Android API v2", not "Google Maps API v2"

    0 讨论(0)
  • 2020-11-27 21:37

    I did everything what was required to achieve this task. My key, manifest, code etc. were all right. But, in the end after wasting a lot of time, the debug keystore which I was using was the wrong one. It's was all about the SHA1 fingerprint after all.

    0 讨论(0)
  • 2020-11-27 21:38

    BTW, I'm running Windows 7. I fussed over this for days, until I discovered the following: I have more than one debug.keystore. One is at:

    C:\android-sdk\.android\debug.keystore
    

    And there's another, at:

    C:\Users\David\.android\debug.keystore
    

    Once I found the "C:\Users\David.android\debug.keystore" I did:

    keytool -list -alias androiddebugkey -keystore C:\Users\David\.android\debug.keystore -storepass   android -keypass android -v
    

    I submitted the resulting SHA1 to google console and got an API-key that works. Getting the SHA1 from the keystore at "C:\android-sdk.android\debug.keystore" does not work.

    0 讨论(0)
  • 2020-11-27 21:45

    I was facing the same issue ; but for me it was keystore issue I was signing it with debug keystore hence Google map api v2 was not able to connect to Google map.

    I created a new api key using my-release-keystore.keystore (u can find it at C:\Users\{YOUR_USER_NAME}\.android\my-release-key.keystore) generate SHA1 using keytool available in JDK; copy it and register with google console.

    Use api key generated in your applications manifest file. Sign it with my-release-key.keystore will pushing it on device.

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