Not able to copy configurations dependencies after upgrading Gradle plugin for Android Studio to 3.0.1 and Gradle to 4.1 Not able to copy configurations dependencies after upgrading Gradle plugin for Android Studio to 3.0.1 and Gradle to 4.1 android android

Not able to copy configurations dependencies after upgrading Gradle plugin for Android Studio to 3.0.1 and Gradle to 4.1


instead of using configurations.implementation, the best option is to use configurations.runtimeClasspath.

You can also think about:compileClasspathdefault


I make configuration can resolved, so no exception get dependcenies's file

configurations.implementation.setCanBeResolved(true)configurations.api.setCanBeResolved(true)println configurations.implementation.resolve()println configurations.api.resolve()


Another suggestion.

I created my custom config and then used it as configurations.customConfig:

configurations {  customConfig.extendsFrom implementation}

The copy task must be correspondingly edited:

task copyLibs(type: Copy) {    from configurations.customConfig    into "$project.rootDir/reports/libs/"}