Circular dependencies cannot exist in RelativeLayout
循环布局错误!!!
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drop_down_item" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal"> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" > <TextView android:layout_alignLeft="@+id/drop_down_list_item_delete" android:layout_alignParentLeft="true" android:id="@+id/drop_down_list_item" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="test" android:textColor="@color/black" android:textSize="20sp"> </TextView> <ImageButton android:layout_alignParentRight="true" android:layout_gravity="center" android:id="@+id/drop_down_list_item_delete" android:layout_width="50dp" android:layout_height="50dp" android:layout_toRightOf="@id/drop_down_list_item" // 这句话发生了循环布局。明明textviw 在button前 ,去掉就好了!! android:background="@drawable/drop_down_user_name_delete"> </ImageButton> </RelativeLayout> </LinearLayout>