Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

debugRuntimeClasspathCopy configuration has been deprecated for consumption

I met the following warning during the Gradle build :

Task :prepareKotlinBuildScriptModel UP-TO-DATE
The debugRuntimeClasspathCopy configuration has been deprecated for consumption. This will fail with an error in Gradle 9.0.

I referred to the Gradle documentation https://docs.gradle.org/8.10.2/userguide/declaring_dependencies.html#sec:deprecated-configurations but I can't identify where is my error.

Here is the dependencies I used in build.gradle:

dependencies {

    implementation libs.androidx.core.ktx
    implementation libs.androidx.lifecycle.runtime.ktx
    implementation libs.androidx.activity.compose
    implementation platform(libs.androidx.compose.bom)
    implementation libs.androidx.ui
    implementation libs.androidx.ui.graphics
    implementation libs.androidx.ui.tooling.preview
    implementation libs.androidx.material3
    implementation libs.androidx.fragment
    implementation libs.androidx.drawerlayout
    implementation libs.material
    implementation libs.androidx.navigation.compose
    implementation libs.androidx.navigation.fragment
    implementation libs.androidx.navigation.dynamic
    implementation libs.androidx.navigation.ui

    // room
    ksp(libs.androidx.room.compiler)
    implementation libs.androidx.room.ktx
    implementation libs.androidx.room.testing

    //ads
    implementation libs.google.ads


    implementation libs.kotlinx.serialization

    implementation libs.google.generativeai
    testImplementation libs.junit
    androidTestImplementation libs.androidx.junit
    androidTestImplementation libs.androidx.espresso.core
    androidTestImplementation platform(libs.androidx.compose.bom)
    androidTestImplementation libs.androidx.ui.test.junit4
    androidTestImplementation libs.androidx.navigation.test

    debugImplementation libs.androidx.ui.tooling
    debugImplementation libs.androidx.ui.test.manifest
}

What can I do to solve this problem?

like image 515
drieu Avatar asked Aug 14 '26 21:08

drieu


1 Answers

I encountered the same warning, and stack trace showed that the warning came from gradle plugin, but it only occured in sync process, not in build. For my project, I using gradle wrapper 8.10.2, and gradle plugin 8.8.0 - which was the maximum compatible version. The warning could be ignored cause I got no errors and just make sure that the compatibility of gradle wrapper and gradle plugin, i guess!

like image 53
Le Hoang Minh Quan B2206008 Avatar answered Aug 17 '26 11:08

Le Hoang Minh Quan B2206008



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!