我已经创建了一个 map 应用程序。它在没有签署 APK 的情况下显示 map ,但是当我尝试签署并稍后在设备中安装该 APK 时, map 不再显示。
最佳答案
您需要单独的 Google Maps API key 才能发布。你说你在 APK 工作时没有签署它,但应用程序实际上是由你的 SDK 使用调试 key 自动签署的。您也可能拥有有效的 Google Maps API key 。
来自 https://code.google.com/android/add-ons/google-apis/mapkey.html 处的文档:
While you are developing and debugging your application, you will likely be sigining your application in debug mode — that is, the SDK build tools will automatically sign your application using the debug certificate. To let your MapView elements properly display Maps data during this period, you should obtain a temporary Maps API Key registered to the debug certificate. To do so, you first need to get the MD5 fingerprint of the debug certificate. When you are ready to release your application, you must register your release certificate with the Google Maps service and obtain a new Maps API Key. You must then change the MapView elements in your application to reference the new API key.
关于android - 如何在已签名的 Android 应用程序上获取 map ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5217139/