The support-v4 transitive dependency is added twice. You can test it using either the dependency task or the dependency report:
MacBook-Pro:demo alex$ ./gradlew app:dependencies --configuration compile
or:
MacBook-Pro:demo alex$ ./gradlew app:dependencyInsight --configuration compile --dependency support-v4
Where demo is the root directory of your project. The output for compilation configuration will be:
compile - Classpath for compiling the main sources. +--- com.android.support:appcompat-v7:21.0.0 | \--- com.android.support:support-v4:21.0.0 | \--- com.android.support:support-annotations:21.0.0 \--- com.wu-man:android-oauth-client:0.0.3 +--- com.google.oauth-client:google-oauth-client-java6:1.15.0-rc | \--- com.google.oauth-client:google-oauth-client:1.15.0-rc | +--- com.google.http-client:google-http-client:1.15.0-rc | | \--- com.google.code.findbugs:jsr305:1.3.9 | \--- com.google.code.findbugs:jsr305:1.3.9 +--- com.google.http-client:google-http-client-jackson:1.15.0-rc | +--- com.google.http-client:google-http-client:1.15.0-rc (*) | \--- org.codehaus.jackson:jackson-core-asl:1.9.11 +--- com.google.android:support-v4:r7 \--- com.google.api-client:google-api-client-android:1.15.0-rc +--- com.google.api-client:google-api-client:1.15.0-rc | \--- com.google.oauth-client:google-oauth-client:1.15.0-rc (*) \--- com.google.http-client:google-http-client-android:1.15.0-rc \--- com.google.http-client:google-http-client:1.15.0-rc (*)
And the output of the dependency report will look like this:
:app:dependencyInsight com.android.support:support-v4:21.0.0 \--- com.android.support:appcompat-v7:21.0.0 \--- compile com.google.android:support-v4:r7 \--- com.wu-man:android-oauth-client:0.0.3 \--- compile
Please note that both appcompat-v7 and android-oauth-client depend on support-v4 . You can easily solve this problem by eliminating the android-oauth-client dependency:
dependencies { compile 'com.android.support:appcompat-v7:21.0.0' compile ('com.wu-man:android-oauth-client:0.0.3') { exclude group: 'com.google.android', module: 'support-v4' } }
source share