android - 生成谷歌地图 Release API Key

标签 android eclipse google-maps

我的应用程序使用谷歌地图,我注册了一个谷歌地图 key 进行调试,它工作正常。但是现在,在发布之前,我需要一个处于 Release模式的 Google Maps key 。我怎样才能得到它?

最佳答案

你需要:

  1. 使用 Keytool 创建您自己的用于发布的签名 key :http://developer.android.com/guide/publishing/app-signing.html#cert

  2. 获取新生成 key 的 MD5 指纹:https://developers.google.com/maps/documentation/android/mapkey#getfingerprint

  3. 向此链接提交签名以获取您的 Google map key :https://developers.google.com/android/maps-api-signup?hl=fr

  4. 在 Eclipse 中使用新创建的 key 导出您的应用程序:右键单击您的项目 -> Android 工具 -> 导出签名的应用程序包。

请注意将您的证书保存在安全的地方,因为如果您想在 Google Play 上发布您的应用更新,您将需要它。

编辑:

对于 Google Maps Android V2,签名略有不同。您将需要获取 SHA-1 签名并提供应用程序的包名称。此外,还需要一个 Google APi 帐户。所有信息都在此页面上提供:https://developers.google.com/maps/documentation/android/start?hl=fr#the_google_maps_api_key

关于android - 生成谷歌地图 Release API Key,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10386770/

相关文章:

java - 如何从原型(prototype)创建 Maven 项目?

java - Junit 测试 Akka 单例 Actor : preStart() hook not called

Android:如何在 MapView 上执行附近搜索

ios - 谷歌地图 - reverseGeocodeCoordinate 不会打印新加坡的地址

android - 我必须在应用小部件中使用什么方法而不是 findViewById?

android - ionic- 最小化 ios 中的应用程序

android - 在运行时更改Gradle依赖项中的代码

android - AVD 模拟器启动时出错

javascript - 如何更改 Google Maps API v3 中的 MapTypeid?

android - 在具有外部依赖性的 Android NDK 中使用 C 库