谷歌Android地图:XML布局错误布局、错误、地图、谷歌

2023-09-13 02:17:22 作者:心易碎、请勿碰

我试图让谷歌地图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的工作室的错误是这样的:

My error in android studio looks like this:

推荐答案

这发生在我身上也。简单地清理项目。

This happens to me as well. Simply clean the project.