Getting CircularReferenceException while processing debug resources in Gradle

  Kiến thức lập trình

`Encountering CircularReferenceException during project build in Android Studio, unsure if it’s related to Gradle or dependencies.

`Circular dependency between the following tasks:
:app:processDebugResources
— :app:processDebugResources
(*)

**

  • Exception is:**
    **org.gradle.api.CircularReferenceException: Circular dependency between the following tasks:
    :app:processDebugResources
    — :app:processDebugResources (*)
    **`

**This is my AndroidManifest.xml file :- **

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">

    <application
        android:allowBackup="true"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.E_commerce_Application"
        tools:targetApi="31">
        <activity
            android:name=".orderConfirmation"
            android:exported="false" />
        <activity
            android:name=".BILLInfo"
            android:exported="false" />
        <activity
            android:name=".payment"
            android:exported="false" />
        <activity
            android:name=".art"
            android:exported="false" />
        <activity
            android:name=".toys"
            android:exported="false" />
        <activity
            android:name=".skincare"
            android:exported="false" />
        <activity
            android:name=".kitchenware"
            android:exported="false" />
        <activity
            android:name=".clothes"
            android:exported="false" />
        <activity
            android:name=".food"
            android:exported="false" />
        <activity
            android:name=".HomePage"
            android:exported="false" />
        <activity
            android:name=".SignUp"
            android:exported="false" />
        <activity
            android:name=".MainActivity"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

This is my build.gradle.kts(:app) :-

plugins {
    id("com.android.application")
    id("com.google.gms.google-services")
}

android {
    namespace = "com.example.e_commerce_application"
    compileSdk = 34

    defaultConfig {
        applicationId = "com.example.e_commerce_application"
        minSdk = 24
        targetSdk = 34
        versionCode = 1
        versionName = "1.0"

        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
    }


    buildFeatures{
        dataBinding = true
        viewBinding = true
    }
    buildTypes {
        release {
            isMinifyEnabled = 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.11.0")
    implementation("androidx.constraintlayout:constraintlayout:2.1.4")
    implementation("com.google.firebase:firebase-auth:22.3.1")
    implementation("com.google.firebase:firebase-database:20.3.1")
    implementation(project(":app"))

    testImplementation("junit:junit:4.13.2")
    androidTestImplementation("androidx.test.ext:junit:1.1.5")
    androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
    // Import the BoM for the Firebase platform
    implementation(platform("com.google.firebase:firebase-bom:32.8.0"))
    implementation("com.google.firebase:firebase-database")
//    implementation("androidx.cardview:cardview:1.0.0")

}```

I tired changing the version of buildtools.I refered this youtube tutorial(https://youtu.be/UcxkuImuju8?si=_VynoO5IkS-BISwg) . `

New contributor

rucha_0803 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website Kho Theme wordpress Kho Theme WP Theme WP

LEAVE A COMMENT