谷歌Android地图:XML布局错误 [英] Android Google Maps: XML layout errors

查看:207
本文介绍了谷歌Android地图:XML布局错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让谷歌地图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.

这篇关于谷歌Android地图:XML布局错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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