android 地图视图不工作
这简直要死我了!!!
我似乎已经做了所有我需要做的事情,但就是行不通!
这就是我所做的:
- 使用 keytool 创建了一个密钥库:
$ keytool -genkey -v -keystore PADReleaseKey.keystore -alias pocket_aces_release -keyalg RSA -keysize 2048 -validity 10000
-从中获取 MD5 指纹并使用:
$ keytool -list -alias pocket_aces_release PADReleaseKey.keystore
-用它来获取mapAPI密钥并将其嵌入到我的应用程序中:
<com.google.android.maps.MapView
android:layout_weight="1" android:id="@+id/mapview"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:apiKey="0qLwM2TNe70Ho-Y1wZiN2MqF_jFIXLc-0gwLRsw"
android:clickable="true"/>
使用 eclipse 以及我之前创建的密钥库和别名导出签名的应用程序包。
使用 adb install 将其安装在我的 Android 计算机上。
但仍然没有显示地图!!!!我已经这样做了好几次了,但它不起作用......
任何人都可以指出我做错了什么吗?
谢谢。
This is killing me!!!
I seem to have done all I need to do but it just wont work!
here is what i did:
-created a keystore using keytool:
$ keytool -genkey -v -keystore PADReleaseKey.keystore -alias pocket_aces_release -keyalg RSA -keysize 2048 -validity 10000
-got the MD5 fingerpring from it and used:
$ keytool -list -alias pocket_aces_release PADReleaseKey.keystore
-used it to get the mapAPI key and embedded it inside my application:
<com.google.android.maps.MapView
android:layout_weight="1" android:id="@+id/mapview"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:apiKey="0qLwM2TNe70Ho-Y1wZiN2MqF_jFIXLc-0gwLRsw"
android:clickable="true"/>
exported a signed application package using eclipse and the keystore and alias I have created before.
installed it on my android machine using adb install.
but still no map is showing!!!! I have done this several times, but it does not work...
can anyone point me to what am i doing wrong?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您说“没有显示地图”时,您能详细说明一下吗?你看到一堆灰色的空白方块了吗?如果是这样,通常是您的 API 密钥存在问题。
另外,您是否在具有 Google API 目标的模拟器上运行它?我写了一个真正的 关于使地图正常工作的基本指南,它可能会对您有所帮助。
问候
When you say "no map is showing" could you elaborate on that a little more? Are you seeing a load of grey blank squares? If so thats normally an issue with your API key.
Also are you running it on an emulator that has the Google APIs target? I wrote a really basic guide on getting maps working, it may help you.
Regards