[英]I got this error when I tried to run my app in android studio. Does anyone know how to solve this problem?
Circular dependency between the following tasks: 以下任务之间的循环依赖关系:
:app:checkManifestChangesDebug
\--- :app:instantRunMainApkResourcesDebug
\--- :app:transformClassesAndDexWithShrinkResForDebug
\--- :app:transformDexArchiveWithDexMergerForDebug
+--- :app:preColdswapDebug
| \--- :app:incrementalDebugTasks
| +--- :app:transformClassesAndClassesEnhancedWithInstantReloadDexForDebug
| | \--- :app:transformClassesWithInstantRunForDebug
| | \--- :app:checkManifestChangesDebug (*)
| \--- :app:transformClassesWithInstantRunForDebug (*)
\--- :app:transformClassesWithDexBuilderForDebug
+--- :app:preColdswapDebug (*)
\--- :app:transformClassesWithInstantRunForDebug (*)
(*) - details omitted (listed previously)
Here is my build.gradle 这是我的build.gradle
buildTypes {
debug {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable true
}
customDebuggableBuildType {
debuggable true
}
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.config
}
}
I tried to change from debuggable true to false then it works but cannot do a debugging Thx in advance 我试图将可调试的true更改为false,但可以,但是无法提前进行调试Thx
This is a common error that is shown when you add 2 views inside a RelativeLayout
while the first one depends on the second one and the second one depends on the first one. 当您在RelativeLayout
添加2个视图而第一个视图依赖于第二个视图,而第二个视图依赖于第一个视图时,会显示此常见错误。 For example, when you put the first view toRightOf="@+id/secondView"
secondView and the second view toRightOf="@+id/firstView"
first view, then this will cause this error. 例如,当您将第一个视图toRightOf="@+id/secondView"
secondView和第二个视图toRightOf="@+id/firstView"
第一个视图时,这将导致此错误。
Your below two gradle tasks depends on each other. 您下面的两个gradle任务彼此依赖。
:app:checkManifestChangesDebug
:app:transformClassesWithInstantRunForDebug
But, this is NOT allowed in Gradle build system. 但是,这在Gradle构建系统中是不允许的。 You should remove this circular dependency. 您应该删除此循环依赖项。
One simpler solution is to disable your instant run feature, see: https://developer.android.com/studio/run/#disable-ir 一种更简单的解决方案是禁用即时运行功能,请参阅: https : //developer.android.com/studio/run/#disable-ir
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.