简体   繁体   English

在智能手机中执行使用 GoogleMaps.apk 的 Android 应用程序时出现问题

[英]Problems executing an Android application which uses GoogleMaps .apk in a smartphone

I have recently developed an Android application which uses the GoogleMaps API and represents the points of the map.我最近开发了一个 Android 应用程序,它使用 GoogleMaps API 并代表 map 的点。 The application works well in the Android emulator, but it does not work when it is executed in a SmartPhone.该应用程序在 Android 仿真器中运行良好,但在智能手机中执行时无法运行。 When the map is represented all the points are shown but the map is not shown (it appears a white map with squares).当表示 map 时,所有点都会显示,但 map 未显示(它显示为带有正方形的白色 map)。 I have generated the.apk whith the default.keystore : debug.keystore .我已经生成了带有default.keystore的 .apk : debug.keystore I have tried to generate the.apk with a customized keystore and obtain the following result:我尝试使用自定义密钥库生成 the.apk 并获得以下结果:

Keystore was tampered with, or password was incorrect.密钥库被篡改,或密码不正确。

Any solution for the program of the API of googlemaps in the smartphone?智能手机中googlemaps API程序的任何解决方案? Does anybody know how to generate a new debug.keystore ?有人知道如何生成新的debug.keystore吗?

Try to create a new keystore.尝试创建一个新的密钥库。 use this new keystore for getting google map api key then run使用这个新的密钥库获取 google map api 密钥然后运行

The easiest way to make a new debug keystore is actually to let the tools do it for you.制作新的调试密钥库的最简单方法实际上是让工具为您完成。 If you delete the existing keystore, the build tools will automatically generate a new one for you.如果您删除现有的密钥库,构建工具会自动为您生成一个新的。 Then, you can do the steps to get the hash and get the API key:然后,您可以执行以下步骤获取 hash 并获取 API 密钥:

The default storage location for AVDs is in ~/.android/ on OS X and Linux, in C:\Documents and Settings\.android\ on Windows XP, and in C:\Users\.android\ on Windows Vista and Windows 7. The default storage location for AVDs is in ~/.android/ on OS X and Linux, in C:\Documents and Settings\.android\ on Windows XP, and in C:\Users\.android\ on Windows Vista and Windows 7 .

The next time you build, the build tools will regenerate a new keystore and debug key.下次构建时,构建工具将重新生成新的密钥库和调试密钥。

Full description of steps here: http://developer.android.com/guide/publishing/app-signing.html此处步骤的完整描述: http://developer.android.com/guide/publishing/app-signing.html

You could use the same keystore as it is, to the device as well.您也可以使用与设备相同的密钥库。 The same keystore works for emulator as well相同的密钥库也适用于模拟器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM