java.lang.IllegalStateException: Circular dependencies cannot exist in RelativeLayout

 

<ImageView
android:id="@+id/singleimage"
android:layout_width="@dimen/magin_corner70"
android:layout_height="@dimen/magin_corner70"

android:layout_alignParentRight="true"
android:layout_marginTop="5dp"

android:visibility="gone" />

这个图片的左侧还有两个控件,都是根据数据来判断是否隐藏的,所以当我给singleimage加了android:layout_toRightOf="@+id/xxx"时就会出现上面的错误。

错误的意思大概为:在相对不居中,不能循环(相互)的依赖。

时间: 2024-10-07 00:32:41

java.lang.IllegalStateException: Circular dependencies cannot exist in RelativeLayout的相关文章

开发问题及解决--java.lang.IllegalStateException: Circular dependencies cannot exist in RelativeLayout

<?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" > <Horiz

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" andro

java.lang.IllegalStateException: Failed to load ApplicationContext

1.错误描述 INFO:2015-02-05 22:14:21[main] - Loading XML bean definitions from class path resource [applicationContext.xml] INFO:2015-02-05 22:14:22[main] - JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning INFO:2015-02-05

junit测试时,出现java.lang.IllegalStateException: Failed to load ApplicationContext

课程设计要求进行junit测试,我是在已经做好的ssh项目上做的测试,测试类代码如下 package com.zhang.web.services; import static org.junit.Assert.*; import org.junit.After; import org.junit.Before; import org.junit.Test; import javax.annotation.Resource; import org.junit.runner.RunWith; im

批量下载的实现及java.lang.IllegalStateException异常

在工作流的一张表单里可能会有多个步骤上传附件,在用户的待办中往往会存在多条带有附件的任务,如果一一打开并且点击下载链接下载,不仅费时,而且繁琐,用户体验较差. OA系统采用的是FastDFS做为文件服务器,FastDFS的Java客户端提供了上传.下载等功能供调用. 在我之前的文章里对此有描述,目前已有的代码有对文件的批量上传功能,但下载的参数往往是针对单个文件.比如单个文件的下载方法如下: /**  * 文件下载  * @author chao.gao  * @date 2014-2-17 下

tomcat启动报错:java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException:

tomcat日志: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at

java.lang.IllegalStateException: attempt to re-open an already-closed object

最后,我还是通过单例模式和"短时间内不关闭SQLiteDatabase"解决了问题. 在自定义的DbHelper类(大部分人定义为DatabaseHelper)中: public static synchronized DbHelper getInstance(Context context){ if(dbInstance == null){ dbInstance = new DbHelper(context.getApplicationContext()); } return dbI

tomcat启动失败,java.lang.IllegalStateException

tomcat日志: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at

java.lang.IllegalStateException: ContainerBase.addChild: start

java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina] Tomcat部署Servlet时出错 caused by: Caused by: java.lang.IllegalArgumentException: Invalid <url-patt