简体   繁体   English

当我尝试在android studio中运行我的应用程序时出现此错误。 有谁知道如何解决这个问题?

[英]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.

相关问题 突然在 Android Studio 中收到以下错误。 该应用程序运行良好,然后当我重新打开它时出现此错误。 有谁知道为什么? - Suddenly receiving the below error in Android Studio. The app was working fine then when I re-opened it I got this error. Anyone know why? 在Android Studio中添加解析sdk后出现错误。 我在互联网上尝试了许多解决方案,但似乎没有什么可以解决 - Got an error after adding parse sdk in android studio. I've tried many solution on internet but seems like nothing can solve 当我尝试在 Android 工作室上执行我的项目时。 它显示以下错误 - When I tried to execute my project on Android studio. It shows following error 如何在android中解决Google地图视图? 当我尝试该程序时,出现以下错误 - How to solve the Google map view in android? When i tried this program i got the following error 我在 Android Studio 中遇到错误。 Gradle 项目同步失败 - I got an error in Android Studio. Gradle Project sync Failed 当我启动 android 仿真器时,它与 android 工作室不同。 它是如何解决的? - When i launch android emulator its different with android studio. How it solve? 在 xamarin Visual Studio 中启动模拟器时出现设备错误。 我该如何解决? - Device Error when lunching a emulator in xamarin visual studio. How can I solve it? 有人知道我如何运行android示例应用程序吗? - Anyone know how I can run an android sample app? 在我的 Mac 上安装 android studio 时出现 Missing SDK 错误。我该如何解决这个问题? - i got Missing SDK error while installing android studio on my mac.. how do i solve this? 当我尝试运行旧的android项目时,在android studio中显示安装生成工具25.0.3错误 - Install build tools 25.0.3 error showing in android studio when i tried to run my old android project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM