谷歌地图显示出来灰色 [英] Google Maps Shows Up Grey

查看:231
本文介绍了谷歌地图显示出来灰色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这已经问过,但我已经读/几个小时测试,我不能让我的地图展现出来!我生成MD5和其注册这给了我,我在下面的code使用的关键。请帮忙!!!!!!
这里是AndroidManifest.xml中:

I know this has been asked before but I have read/tested for hours and I can't get my maps to show up! I generated the md5 and registered it which gave me the key I use in the code below. PLEASE HELP!!!!!! Here is the androidmanifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.libertytech.locatemycar"
  android:versionCode="1"
  android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
    <uses-library android:name="com.google.android.maps" />
    <activity android:name=".Home"
              android:label="@string/app_name"
              android:configChanges="orientation|keyboardHidden|keyboard">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name="com.libertytech.locatemycar.GoogleMap" android:label="@string/app_name"
              android:theme="@android:style/Theme.NoTitleBar"
              android:configChanges="orientation|keyboardHidden|keyboard">
    </activity>
    <activity android:name="com.libertytech.locatemycar.Test" android:label="@string/app_name"
              >
    </activity>

</application>
<uses-permission android:name="android.permission.Internet"/>
<uses-permission android:name="android.permission.ACCESS_COURSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-sdk android:minSdkVersion="7" />
</manifest> 

下面是googlemaps.xml
    

Here is the googlemaps.xml

<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="006_T_R2vy70wILMHcCnAGiZoOe7jVjYM_xYtXA"
/>

所有所需的XML标签似乎是在正确的位置。我在手机上互联网(我可以浏览网页)。我缺少什么?

All the required xml tags seem to be in the correct place. I have internet on the phone (I can browse the web). What am I missing?

推荐答案

原来,我需要使用 android.permission.INTERNET对不是的android .permission.Internet !如果谷歌能够给有关缺少权限或一些有用的错误这将是很好。这将有救了我的工作几个小时!

Turns out that I needed to use android.permission.INTERNET not android.permission.Internet! It would be nice if Google could have given an error about missing permissions or something useful. It would have saved me hours and hours of work!

这篇关于谷歌地图显示出来灰色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆