以下任务之间的循环依赖: :app:processDebugResources \--- :app:processDebugResources

问题描述 投票:0回答:1

可能是什么问题?

  • 例外是: org.gradle.api.CircularReferenceException:以下任务之间的循环依赖: :app:process调试资源 --- :app:processDebugResources (*)

我尝试更改buildTools的版本 那是我的 biuld.gradle

plugins {
    id 'com.android.application'
}

android {
    namespace 'com.example.ban_hang'
    compileSdk 33
    buildToolsVersion "34.0.0"

    defaultConfig {
        applicationId "com.example.ban_hang"
        minSdk 33
        targetSdk 33
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {

    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.9.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation project(path: ':app')
    implementation project(path: ':app')
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
    implementation "androidx.recyclerview:recyclerview:1.2.1"
    implementation "androidx.cardview:cardview:1.0.0"
}
java android gradle dependencies resources
1个回答
0
投票

两个潜在原因:

  • implementation project(path: ':app')
    行指的是同一个项目。 (假设上面的内容是
    :app
    模块的
    build.gradle
    内容。)
  • 您的多模块构建中有两个具有相同名称的模块(尚不确定为什么这可能是一个问题,但这是我的问题)。
© www.soinside.com 2019 - 2024. All rights reserved.