问题现象:源代码:
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/TableLayout01"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:gravity="top" >        <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/abc"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" >            <TextView
                android:id="@+id/textView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/tv1" />        </TableLayout>    </LinearLayout>

解决方案 »

  1.   

    警告可以忽略
    还有就是xmlns:android="http://schemas.android.com/apk/res/android"只需要一个就可以了
      

  2.   

    就为了那个警告这么纠结?因为你的LinearLayout下面就一个子控件,所以LinearLayout多余的,系统告诉你可以优化下,减少UI层级
      

  3.   

    是个警告,不影响程序,是因为你的LinerLayout下面只有一个TableLayout,没有任何其他的布局,所以这样的话,LinnerLayout在这里就对TableLayout没有约束了