【发布时间】:2011-09-29 01:45:45
【问题描述】:
我已经搜索了所有其他线程并按照官方指南进行操作,但我仍然无法在我的 Android 设备上显示地图。
我已经生成了 md5 指纹,上传到 google,将密钥复制到我的 show_map.xml 文件中,启用了 INTERNET 权限等,但仍然无法使用!
我什至尝试过使用 Android 2.1 而不是 2.2(我目前正在使用)。
这是我的 show_map.xml 文件:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.google.android.maps.MapView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="04IbV5zNab7z_PHdxydzY-xxxxxxxxxxxxxxxxxxx"
/>
</LinearLayout>
这是我的清单文件:
<application android:icon="@drawable/icon" android:label="@string/app_name">
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-library android:name="com.google.android.maps" />
<activity android:name=".Clarity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".main_menu"
android:label="@string/app_name">
</activity>
<activity android:name=".ShowJobsOnMap"
android:label="@string/app_name">
</activity>
</application>
非常感谢任何人提供的任何帮助。
非常感谢,
【问题讨论】:
-
您是否使用正确的密钥签署了应用程序?
-
我不知道...我认为这是正确的密钥。它叫做 debug.keystore。
-
我指的是here描述的最后一步
-
我正在使用调试证书。如何签署我的应用程序?我认为这与导出已签名的应用程序不同?
-
在 Eclipse 中右键单击项目 -> Android 工具 -> 导出签名的应用程序包。出于开发目的,您应该生成第二个 api 密钥,它适用于您的调试证书。
标签: java android google-maps map