4

When compiling with latest Android Studio 3.0 (gradle 4.1) I get

Unable to resolve dependency for ':app@fullReleasenoproguard/compileClasspath': Could not resolve project :aFileChooser.

I fixed it changing in build.gradle from

dependencies {
    compile project(':aFileChooser')
}

to

dependencies {
    implementation project(path: ':aFileChooser', configuration: 'default')
}
Nicola Beghin
  • 464
  • 3
  • 17
  • Possible duplicate of https://stackoverflow.com/questions/46952796/android-studio-3-0-upgrade-errorcould-not-resolve-all-files-for-configuration – Nawrez Nov 05 '17 at 18:55
  • @HadjKhelilNawrez different scope, this refers to local library include. I spent quite some time figuring out that adding `configuration: 'default'` made it possible to use old local libraries – Nicola Beghin Nov 06 '17 at 21:41
  • did you try with dependencies { implementation project(path: ':aFileChooser') } – Nawrez Nov 06 '17 at 21:42
  • Yes but it didn't work. Seems like the additional configuration part is required for old libraries – Nicola Beghin Nov 07 '17 at 08:22
  • Could you please provide gradle file of app and aFileChooser then i can surely help you :) – Gaurav Singh Nov 15 '17 at 06:52
  • @Newbie the aFileChoose gradle file is pretty standard: apply plugin: 'com.android.library' android { compileSdkVersion 26 buildToolsVersion '26.0.2' defaultConfig { minSdkVersion 14 targetSdkVersion 26 } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } } dependencies { compile 'com.android.support:support-v4:26.1.0' } – Nicola Beghin Nov 15 '17 at 11:35

0 Answers0