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

家住魔仙堡 提交于 2019-12-20 17:39:14

问题


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


回答1:


change dependency declaration

from

compile files('libs/commons-lang-2.4.jar')

to

implementation files('libs/commons-lang-2.4.jar')




回答2:


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




回答3:


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



来源:https://stackoverflow.com/questions/46952796/android-studio-3-0-upgrade-errorcould-not-resolve-all-files-for-configuration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!