Nawrez
Nawrez

Reputation: 3332

ANDROID STUDIO 3.0 upgrade : Error:Could not resolve all files for configuration ':app:xxxxxxxDebugCompileClasspath'

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/g‌​radle-4.1-all.zip

Upvotes: 20

Views: 47760

Answers (4)

hrishikesh chaudhari
hrishikesh chaudhari

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

scionoftech
scionoftech

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

Audida
Audida

Reputation: 124

I had the same problem, build -> clean project worked for me.

Upvotes: 7

Sandeep Manmode
Sandeep Manmode

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

Related Questions