AndroidDev
AndroidDev

Reputation: 45

All com.android.support libraries must use the exact same version specification gradle issue

I am getting the issue All com.android.support libraries must use the exact same version specification when I am trying to sync my gradle file. Can any one please tell me the way by which I can solve my problem. I have already gone through this solution All com.android.support libraries must use the exact same version specification. but unfortunately it is not working in my case. Below is my gradle.

apply plugin: 'com.android.application'


android {
compileSdkVersion 23
buildToolsVersion "25.0.0"
defaultConfig {
    applicationId "com.application"
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}
useLibrary 'org.apache.http.legacy'

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {

compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:recyclerview-v7:23.2.0'
compile 'org.altbeacon:android-beacon-library:2.+'
compile 'com.google.firebase:firebase-messaging:10.2.1'
compile 'com.google.android.gms:play-services-gcm:10.2.1'
compile 'com.google.code.gson:gson:2.7'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:design:23.2.0'


testCompile 'junit:junit:4.12'
}



apply plugin: 'com.google.gms.google-services'

Upvotes: 1

Views: 257

Answers (1)

Gabriele Mariotti
Gabriele Mariotti

Reputation: 364928

Since you are using

compile 'com.google.android.gms:play-services-gcm:10.2.1'

You have a dependency with the support libraries v24.

In general you can use this command to check your dependencies tree.

./gradlew app:dependencies

Upvotes: 1

Related Questions