1

我一直在查看有关该错误的先前主题,他们说我应该首先列出 android:xmlns 属性,这就是我所做的,但我仍然面临该错误,不知道为什么。(如果我从工作中复制另一个布局并不重要)。无论如何,这是XML:

<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" >

<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="*CENSORED*"/>


</RelativeLayout>

这里可能是什么问题?

4

2 回答 2

0
<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">

        <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="wrap_content"
            android:clickable="true"    
            android:layout_above="@+id/ll"
            android:apiKey="*******"    />           
</RelativeLayout>

这是我的 xml,它适用于我。我认为您缺少第一行。

于 2012-09-07T21:47:49.200 回答
0

解决方案是:必须重置我的 adb ..

于 2012-09-11T08:03:56.243 回答