繁体   English   中英

Android MapActivity:未显示

[英]Android MapActivity: not being displayed

我搜索了所有其他线程并遵循官方指南,但我仍然无法在我的 android 设备上显示 map。

我已经生成了 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>

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

提前谢谢了,

好吧,经过一夜的睡眠,我想通了...

谷歌 map 仅显示空白图块 android

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

刘海离开办公桌

谢谢你们的回应

暂无
暂无

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

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