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

查看:32
本文介绍了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.

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

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