-1

可能重复:
Google 地图可以在模拟器上显示,但不能在 Android 设备上显示

我想获得最终版本的 .apk 文件,但是当我在手机上安装程序时,程序不显示地图,但是当我在 eclipse 中运行程序时,程序运行正常。我想,也许这个程序没有地图库。问题是什么?我应该怎么办?

4

2 回答 2

1

It's because you are deploying using the Google Maps Api key for debug, not for release.

You should read https://developers.google.com/maps/documentation/android/mapkey.

Hope it helps, and if you need more helps let me know.

Steps to generate apiKey for release:
1. Build Keystore - from eclipse > right click on project and then android tools > Export Signed Application Package 2. Open cmd and write

c:\Program Files (x86)\Java\jre7\bin > keytool -v -list -alias <your alias> -keystore <path to keystore>

where < your alias > is one used when generating the keystore
< path to keystore > to path where you have placed the keystore
This command can be different for you.

You will get the MD5 code needed for generating the api key.

Hope this helps.

于 2012-11-01T15:34:14.960 回答
0

谢谢我写了这个,cmd不写MD5!我把 pictur cmd 放在下面。 命令

于 2012-11-01T17:36:54.013 回答