I am trying to build my code and this is what I am getting:
> Could not resolve all files for configuration ':MyPlugin:debugRuntimeClasspath'.
> Failed to transform commons-lang3-3.14.0.jar (org.apache.commons:commons-lang3:3.14.0) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=24, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for DexingNoClasspathTransform: /home/kristyna/.gradle/caches/transforms-3/1ad45cefc0a573e6c029ad0130df4c51/transformed/jetified-commons-lang3-3.14.0.jar.
> Error while dexing.
It has been a while since I have opened this project and now all the sudden this is happening.
I have tried ./gradlew clean
and ./gradlew --stop
. That didn't help. Next on my list is to delete ~/.gradle/caches
but I would rather avoid this step. Any ideas?
EDIT: I have deleted ~/.gradle/caches
, it did not help either.
EDIT2: It happened with a different project now, again the code has not changed. This makes me believe it is something in my environment. I have re-downloaded 7.5 gradle and it is still not working. But it works if I change the project to use gradle 8. Why is it happening all of the sudden?
I solved this problem by upgrading Android Gradle Plugin to version 8.3.1.
You can use Tools->AGP Upgrade Assistant to upgrade Android Gradle plugin.