Android 谷歌地图:XML 布局错误
问题描述:
我正在尝试使用 android studio 使谷歌地图 v2 在 android 中工作.我得到了我所有的钥匙和清单设置.当我尝试为地图将显示的实际活动创建 xml 时,我收到错误消息.我的 xml 看起来像这样:
I am trying to get google maps v2 to work in android using android studio. I got all my keys and manifest setup. When I try and create xml for the actual activity that the map will show up on I get errors. My xml looks like this:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment"/>
</RelativeLayout>
我在 android studio 中的错误如下所示:
My error in android studio looks like this:
答
这也发生在我身上.只需清理项目.
This happens to me as well. Simply clean the project.