How to show a map in an Android mapactivity?

旧时模样 提交于 2019-11-29 11:35:12

When you run or debug through Eclipse your app is signed with your debug key which will have been automatically created. It is not the same as the key you sign your app with when releasing it.

You need to get an API key using your debug key.

See the 'Getting the MD5 Fingerprint of the SDK Debug Certificate' section on http://code.google.com/android/add-ons/google-apis/mapkey.html

Once you are ready to release your app, you replace the debug API key with the API key you are currently using.

Make sure you have the INTERNET permission and a proper API key. Either of those will give you the blank grid effect.

http://code.google.com/android/add-ons/google-apis/mapkey.html

Turns out the map is only shown when the app is signed and uploaded using adb install {path to app}, the same app didn't work when I run or debug using Eclipse.

Check out the followings: 1. include jar of maps. 2. generate your certificate and register it. It should work now :)

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