Why am I getting a CircularDependencyException?

后端 未结 3 1383
慢半拍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:25

    RelativeLayout "left" is trying to lay itself out based on the location of RelativeLayout "right". This cannot be done, because as the exception says, it's circular. How can you park a car based on the parking of another car if that car is still moving?

    Based on your xml file, I recommend you use LinearLayouts. There really isn't anything that you are doing here that can't be solved with two LL's and the parent RelativeLayout.

提交回复
热议问题