为 Android 生成谷歌地图 API 不显示地图
请有人帮助我解决这个问题 ::(
我正在使用 ubuntu 11.04 操作系统、Eclipse 和 Google+Android 2.2
我的 Android 应用程序包括 google 地图,因此我签署并生成了我的 google API 密钥 但是当运行我的应用程序时,我的地图不显示,而只显示网格视图。
我使用 cmd 来签署 API 密钥并生成 MD5 指纹。我的步骤如下:
- 我通过这个命令定向到keystore目录-->
~/.android/
- 然后我使用这个命令签名-->
keytool -genkey -v -keystore my-release-key.keystore -alias release_alias -keyalg RSA -keysize 2048 - 有效期 10000
- 输出是这样的
[存储 my-release-key.keystore]。
- 然后我将目录更改为这个路径-->
/usr/lib/jvm/java-6-sun-1.6.0.26/bin/
- 并执行这个命令
“sudo su”< /代码>。
现在,我给出了生成的密钥库的路径 (my-release-key.keystore
)。
最后我生成了我的MD5指纹
FE:30:45:17:46:1F:18:0E:8D:0B:36:F5:8F:04:81:D8
我将相同的内容复制到注册中。
但现在我只得到网格视图,但没有地图:( :( :(
有人请帮助我解决这个问题..我已经为此尝试了一个星期了:( :(
大家好谁回答了我..现在我在模拟器中得到了地图以下命令对我有用:)感谢所有人:)
og-admin@Android2:~$ cd /usr/lib/jvm/java-6-sun-1.6.0.26/bin/ og-admin@Android2:/usr/lib/jvm/java-6-sun-1.6.0.26/bin$ keytool -list -keystore /home/og-admin/.android/debug.keystore -storepass android -keypass android
密钥库类型:JKS 密钥库提供程序:SUN
您的密钥库包含 1 个条目
androiddebugkey,2011 年 7 月 21 日,PrivateKeyEntry,证书 指纹(MD5):B4:6C:93:21:C6:6D:50:0B:1B:64:15:5D:FA:1F:2D:B1 og-admin@Android2:/usr/lib/jvm/java-6-sun-1.6.0.26/bin$
Some one please help me out of this ::(
I am using ubuntu 11.04 OS, Eclipse and Google+Android 2.2
My android application includes google map and so I signed and generated my google API key
but when running my application my map is not displayed but only the grid view.
I used cmd to sign the API key and to generate MD5 finger print. My steps are as follows:
- I directed to the keystore directory through this command -->
~/.android/
- Then I signed using this command-->
keytool -genkey -v -keystore my-release-key.keystore -alias release_alias -keyalg RSA -keysize 2048 -validity 10000
- An output came like this
[Storing my-release-key.keystore].
- Then I changed the directory to this path-->
/usr/lib/jvm/java-6-sun-1.6.0.26/bin/
- and executed this command
"sudo su"
.
Now I gave the path to the keystore I generated (my-release-key.keystore
).
Finally I generated my MD5 fingerprint
FE:30:45:17:46:1F:18:0E:8D:0B:36:F5:8F:04:81:D8
I copied the same into the sign up.
But now am getting only the grid view but not the map :( :( :(
Someone please help me out of this.. I had been trying for this for an week :( :(
Hi to everybody who answered me.. Now I got the map in my emulator. The following command worked for me :) And thanks to all:)
og-admin@Android2:~$ cd /usr/lib/jvm/java-6-sun-1.6.0.26/bin/
og-admin@Android2:/usr/lib/jvm/java-6-sun-1.6.0.26/bin$ keytool -list
-keystore /home/og-admin/.android/debug.keystore -storepass android -keypass androidKeystore type: JKS Keystore provider: SUN
Your keystore contains 1 entry
androiddebugkey, Jul 21, 2011, PrivateKeyEntry, Certificate
fingerprint (MD5): B4:6C:93:21:C6:6D:50:0B:1B:64:15:5D:FA:1F:2D:B1
og-admin@Android2:/usr/lib/jvm/java-6-sun-1.6.0.26/bin$
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我以前也遇到过同样的问题。我忘了放
<使用权限 android:name="android.permission.INTERNET" />
在清单中。这授予应用程序下载图块的权限。
I had the same problem once before. I had forgotten to put
< uses-permission android:name="android.permission.INTERNET" />
in the manifest. Which gave the app permission to download the tiles.
非常感谢您的回复:)我通过这个命令得到了地图..
og-admin@Android2:~$ cd /usr/lib/jvm/java-6-sun-1.6.0.26/bin/ og-admin@ Android2:/usr/lib/jvm/java-6-sun-1.6.0.26/bin$ keytool -list -keystore /home/og-admin/.android/debug.keystore -storepass android -keypass android
密钥库类型:JKS 密钥库提供商:SUN 您的密钥库包含 1 个条目 androiddebugkey,2011 年 7 月 21 日,
PrivateKeyEntry,证书指纹 (MD5):B4:6C:93:21:C6:6D:50:0B:1B:64 :15:5D:FA:1F:2D:B1 og-admin@Android2:/usr/lib/jvm/java-6-sun-1.6.0.26/bin$
Thank you very much for your reply:) I got the map through this command..
og-admin@Android2:~$ cd /usr/lib/jvm/java-6-sun-1.6.0.26/bin/ og-admin@Android2:/usr/lib/jvm/java-6-sun-1.6.0.26/bin$ keytool -list -keystore /home/og-admin/.android/debug.keystore -storepass android -keypass android
Keystore type: JKS Keystore provider: SUN Your keystore contains 1 entry androiddebugkey, Jul 21, 2011,
PrivateKeyEntry, Certificate fingerprint (MD5): B4:6C:93:21:C6:6D:50:0B:1B:64:15:5D:FA:1F:2D:B1 og-admin@Android2:/usr/lib/jvm/java-6-sun-1.6.0.26/bin$