Reputation: 3372
Project in Android Studio, and getting this error:
com.android.support libraries must use the exact same version specification.
Found Versions com.android.support:support-compat:25.2.0 and com.android.support:app-compat-v7:22.2.1
The problem is however, I have NO reference in my build.gradle files to com.android.support:support-compat:25.2.0
So, where do I find where this dependency is coming from? Here are my dependencies:
Module Build
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':lvl')
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.google.android.gms:play-services-maps:11.6.0'
compile 'com.google.android.gms:play-services-location:11.6.0'
compile 'com.google.android.gms:play-services-auth:11.6.0'
compile 'org.jsoup:jsoup:1.10.3'
compile 'com.google.apis:google-api-services-oauth2:v1-rev143-1.24.1'
compile 'com.google.maps.android:android-maps-utils:0.4'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.volley:volley:1.1.0'
compile 'com.android.support:design:22.2.1'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.android.support:support-v4:22.2.1'
}
Project build:
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
I am perplexed. Where is this 25.2.0 support dependency coming from? And how do I get rid of it?
Upvotes: 0
Views: 894
Reputation: 5321
Seems like any 3rd party is using this support lib dependency internally. You can see the dependency tree using following gradle task:
gradle app:dependencies
It will print all the direct dependencies as well as dependencies declared by any 1st/2nd/3rd party libs you have included.
And then you can do something like this to exclude that dependency from your tree, For example, if play-services was the culprit, then you can do something like this:
compile('com.google.android.gms:play-services-base:6.5.1'){
exclude module: 'support-v4'
}
Upvotes: 1