如何为Android生成Google地图发布密钥

时间:2012-06-07 18:34:03

标签: android google-maps key

如何生成Google Api发布密钥?在开发环境中,我使用debug.keystore生成调试密钥。但我现在即将向市场发布Android应用程序。那么如何生成发布密钥呢?

2 个答案:

答案 0 :(得分:0)

您需要知道的所有内容都记录在案here - Obtaining a Google Maps Android API Key

答案 1 :(得分:0)

谷歌搜索了很多,直到找到一个给我。

以下是命令在命令提示符中的外观

C:\Program Files\Java\jre7\bin> keytool -v -list -keystore C:\Users\Andranik\.android\MyKeystore 

不复制MD5并转到here。在这里你得到了apiKey。

将您的密钥替换为HERE_YOUR_KEY,然后就可以了。

<com.google.android.maps.MapView
        android:id="@+id/myGMap"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:enabled="true"
        android:clickable="true"
        android:apiKey="HERE_YOUR_KEY"/>