Reputation: 3332
I found this warning after upgrading the latest android studio stable version
Error:Could not resolve all files for configuration ':app:xxxxxxxDebugCompileClasspath'.
Failed to transform file 'commons-lang-2.4.jar' to match attributes {artifactType=android-classes} using transform JarTransform Transform output file xxxxxxx/xxxxxxx/xxxxxxx/app/commons-lang-2.4.jar does not exist.
here is gradle and gradle wrapper versions :
gradle : classpath 'com.android.tools.build:gradle:3.0.0'
and
gradle wrapper :
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
Upvotes: 20
Views: 47760
Reputation: 906
I had same problem , googled a lot but nothing worked. Following worked for me on Android 4.2.1
Go to File -> Manage IDE Settings -> Restore IDE Settings
Then follow the instructions.
Upvotes: 1
Reputation: 618
change dependency declaration
from
compile files('libs/commons-lang-2.4.jar')
to
implementation files('libs/commons-lang-2.4.jar')
Upvotes: 12
Reputation: 395
Change the classpath of Project Gradle to:
classpath 'com.android.tools.build:gradle:3.1.0-alpha01'
OR
change distributionUrl of gradle-wrapper.properties to
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
Hope it helps you
Upvotes: 3