My App Crashes After Adding Android:layout_below
Solution 1:
android:layout_alignBottom="@+id/secondLine" // remove this
for textview1
and
android:layout_below="@id/textView1"
for textView2
causes
java.lang.IllegalStateException: Circular dependencies cannot exist in RelativeLayout
Remove one of them and it should work
Place second TextView
with id secondLine
relative to TextView
with id textview1
. You have Circular dependencies which is not possible and hence the error.
You need to place once view relative to another.
Solution 2:
You are assigning a textView1
to android:layout_alignBottom="@+id/secondLine"
and to second TextView you are assigning secondLine
to android:layout_below="@id/textView1"
it mean you are assigning one textview to another and that second to first one.
this is creting Circular dependencies.
You can not assing TextView1 <--> TextView2
connections. you can assign only single side.
remove either of the line.
android:layout_alignBottom="@+id/secondLine"
or
android:layout_below="@id/textView1"
Solution 3:
Both TextViews are pointing to each of them like android:layout_alignBottom="@+id/secondLine" and android:layout_below="@id/textView1" so it forms like circular loop, hence you are getting the error. Remove this android:layout_alignBottom="@+id/secondLine" from first textview
Post a Comment for "My App Crashes After Adding Android:layout_below"