Configuration#canBeResolved returns true but resolution is not possible


(Karol Wrótniak) #1

Configurations <variant>CompileClasspath in Android projects having another module as dependency in fact cannot be resolved despite that canBeResolved is true.
The error:

Could not resolve all files for configuration ‘:app:debugCompileClasspath’.
More than one variant of project :lib matches the consumer attributes:

Sample project which reproduces this issue:


Build log:
https://jitpack.io/com/github/DroidsOnRoids/android-resolve-test/-a2e6dbcf62-1/build.log

Is it a bug in Gradle or Android Gradle Plugin?
Or maybe there is another way to resolve that configuration.