Android MapActivity:未显示

时间:2011-07-05 19:00:02

标签: java android google-maps map

我搜索了所有其他主题并遵循官方指南,但我仍然无法在我的Android设备上显示地图。

我已经生成了md5指纹,将其上传到谷歌,将密钥复制到我的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>

非常感谢任何人提供的任何帮助。

非常感谢,

1 个答案:

答案 0 :(得分:0)

好的,经过一夜的睡眠,我想出来了......

Google map displaying only blank tiles android

<uses-permission ...>必须是<manifest>的孩子,而不是<application>

Bangs离开办公桌

感谢回复人员