main.xml:Index:0,Size:0html
这个错误eclipse不会提示问题出在哪,后来发现是由于使用了9patch图片,并且被嵌套在多层级linearLayout的weight=0的布局方式中。android
<!-- 包裹周围框子用置于底层内容的上层 --> <LinearLayout android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1" android:orientation="horizontal" > <!-- 第二层上侧 --> <LinearLayout android:layout_width="0dp" android:layout_height="fill_parent" android:layout_weight="1" android:orientation="horizontal" > <ImageButton android:id="@+id/ib_" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/friendscenter_head_bg" /> <!-- 这个地方用9patch图片会出错 --> </LinearLayout> <LinearLayout android:layout_width="0dp" android:layout_height="fill_parent" android:layout_weight="1" android:orientation="horizontal" > <ImageButton android:id="@+id/ib_" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/friendscenter_expandstate_bg" /> </LinearLayout> <LinearLayout android:layout_width="0dp" android:layout_height="fill_parent" android:layout_weight="1" android:orientation="horizontal" > <ImageButton android:id="@+id/ib_" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="right" android:background="@drawable/friendscenter_white_bg" /> </LinearLayout> </LinearLayout>