申请Google Map API Key
来源:互联网 发布:打印数组 编辑:程序博客网 时间:2024/05/21 06:40
开发Android应用程序,如果使用到GoogleMaps,须先向Google申请一组经过验证的Android Maps API Key,这组Key可以在多个应用程序中使用。
1,申请Android Maps API Key前,需先从开发环境中取得keystore的MD5编码,然后通过Google网站的签署,便可获得
debug.keystore文件路径可由Eclipse IDE中“Window - Preferences - Android - Build”中找到
$keytool -list -alias androiddebugkey -keystore /home/cat/.android/debug.keystore -storepass android -keypass android
androiddebugkey, 2012-9-1, PrivateKeyEntry,
认证指纹 (MD5): 97:33:40:5E:FD:XX:XX:XX:YY:YY:YY:ZZ:ZZ:ZZ:19:11
-list
Print an MD5 fingerprint of a certificate.-keystore <keystore-name>.keystore
The name of the keystore containing the target key.-storepass <password>
A password for the keystore.
As a security precaution, do not include this option in your command line unless you are working at a secure computer. If not supplied, Keytool prompts you to enter the password. In this way, your password is not stored in your shell history.
-alias <alias_name>
The alias for the key for which to generate the MD5 certificate fingerprint.-keypass <password>
The password for the key.
As a security precaution, do not include this option in your command line unless you are working at a secure computer. If not supplied, Keytool prompts you to enter the password. In this way, your password is not stored in your shell history.
如果下次需要再查看这个MD5值,可以通过$ keytool -list -keystore /home/cat/.android/debug.keystore命令,输入keystore密码:android得到
Keystore 类型: JKS
Keystore 提供者: SUN
您的 keystore 包含 1 输入
androiddebugkey, 2012-9-1, PrivateKeyEntry,
认证指纹 (MD5): 97:33:40:5E:FD:XX:XX:XX:YY:YY:YY:ZZ:ZZ:ZZ:19:11
2,访问https://developers.google.com/android/maps-api-signup?hl=zh-CN,输入取得的MD5编码,申请Android Maps API Key
<com.google.android.maps.MapView android:layout_width="fill_parent" android:layout_height="fill_parent" android:apiKey="0mP5XXn2YY7wzy_2ZZc4OObP_WCQQX9hPPpLMMQ" />
3,将获得的Android Maps API Key放入工程的layout文件中使用
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/linearLayout2"
android:apiKey="0mP5XXn2YY7wzy_2ZZc4OObP_WCQQX9hPPpLMMQ"
android:clickable="true"
android:enabled="true" >
</com.google.android.maps.MapView>
- 申请google map api-key
- 申请Google Map API Key
- google map api key申请
- google map api key申请
- 怎么申请google map api-key
- 申请Google Map Android API Key
- 申请android google map API key
- 申请 ANDROID GOOGLE MAP API KEY
- 怎么申请google map api-key
- 如何申请google map api key
- 申请Google Map Android API Key
- 申请android google map API key
- 申请android google map API key
- 申请Google Map Android API Key
- Android:Google Map Api Key申请
- 申请Google Map Android API Key
- 申请google map api-key的方法
- 如何申请google map api V2 key
- Asio 核心概念和功能文档学习(三)
- matlab 矩阵合并的函数cat()
- winform里让listview勾选项勾选时只能勾选一个的方法
- 死锁问题
- 23种设计模式之间的关系
- 申请Google Map API Key
- 浮点数在内存中的表示
- linux 使用ssh远程登录远程主机
- 一篇完整的doxygen示例代码
- 东方程序员怎么看西方程序员
- 搜狗面试归来总结
- 开源项目之Android-GL(OpenGL 编程)
- 网站调优的自我总结
- 反斜杠就是 捺,很反动,反清复明