Unexpected namespace prefix "xmlns" found for tag RelativeLayout

来源:互联网 发布:龙跃科技淘宝采集软件 编辑:程序博客网 时间:2024/04/29 03:30

在安卓开发中,在布局文件中如果出现Unexpected namespace prefix "xmlns" found for tag RelativeLayout 错误,一般情况下都是命名空间定义发生冲突所致,解决办法就是在多个布局格式后,只保留一个xmlns:android="http://schemas.android.com/apk/res/android",  其余的全删掉。如下所示,只保留<TabHost>后面一个命名空间的定义。



<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <LinearLayout 
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">


       。。。。。。。。
    

          
       .。。。。。。。。


<AbsoluteLayout 
  android:id="@+id/AbsoluteLayout03"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
>

      </LinearLayout>

  </AbsoluteLayout>

</TabHost>

0 0
原创粉丝点击