简体   繁体   English

Android MapActivity:未显示

[英]Android MapActivity: not being displayed

I've searched all the other threads and followed the official guide, but I still can't display a map on my android device.我搜索了所有其他线程并遵循官方指南,但我仍然无法在我的 android 设备上显示 map。

I've generated the md5 fingerprint, uploaded it to google, copied the key into my show_map.xml file, enabled INTERNET permissions, etc. and it still won't work!我已经生成了 md5 指纹,将其上传到 google,将密钥复制到我的 show_map.xml 文件中,启用了 INTERNET 权限等,但它仍然无法正常工作!

I've even tried with Android 2.1 instead of 2.2 (which I'm currently using).我什至尝试过使用 Android 2.1 而不是 2.2(我目前正在使用)。

Here's my show_map.xml file:这是我的 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>

Here's my Manifest file:这是我的清单文件:

<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>

Any help anyone can offer is greatly appreciated.非常感谢任何人可以提供的任何帮助。

Many thanks in advance,提前谢谢了,

Ok, after a night's sleep, I figured it out...好吧,经过一夜的睡眠,我想通了...

Google map displaying only blank tiles android 谷歌 map 仅显示空白图块 android

<uses-permission...> must be a child of <manifest> , not <application> <uses-permission...>必须是<manifest>的孩子,而不是<application>

Bangs head off desk刘海离开办公桌

Thanks for the responses guys谢谢你们的回应

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

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