Cannot load Google maps

和自甴很熟 提交于 2019-12-12 02:56:50

问题


One of the options in my app is launching the google maps.

The scenarios:

  • Regular install => adb install xx.apk -> maps are loading successfully.
  • Install it with test server -> calabash-android gen xx.apk, etc. -> the maps are not loading.

In the Android monitor I got the next message in the logcat:

05-14 18:43:18.239: E/Google Maps Android API(24417): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).

Tried to change Keystores but I got the same results.

There is no issue with the network connection.

What I’m missing?


回答1:


When you get your Google Maps key, you need to get two. One for the debug version of your APK, and one for your release version of your APK.

https://developers.google.com/maps/documentation/android/start#display_your_apps_certificate_information

You need to get your signing key information (stored on your computer), and then register it with Google with their online console.

What's happening here is one of your APKS is built with your debug key, and one with your release key, but the map keys are the same with both of them.



来源:https://stackoverflow.com/questions/30242095/cannot-load-google-maps

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