Why am I getting a CircularDependencyException?

后端 未结 3 1370
慢半拍i
慢半拍i 2020-12-19 16:12

Hey I am trying to make a notification for my file uploading notification. This is my XML: but it keeps giving me the error: Circular dependencies cannot exist in RelativeLa

3条回答
  •  再見小時候
    2020-12-19 16:23

    You try to refer two layouts each other in your layout. A part of codes shows as below,

    
        
        
     
    

    It will occur circular dependency exception.

    How to fix?

    Set gravity type of one layout, Other layout refers this.

    For this case, remove android:layout_toRightOf="@+id/left"

    Because default layout gravity is left, then remove this line. It will be fine.

    Have fun @.@

提交回复
热议问题