Unexpected namespace prefix "xmlns" found for tag RelativeLayout

在安卓開發中,在佈局文件中如果出現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>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章