1

I have a problem in build.gradle (Module app) that I can not resolve

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.3"
    defaultConfig {
        applicationId "ahmedchtn.smartschool"
        minSdkVersion 17
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    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'
    })

    //RecyclerView

    //retrofit,gson

    //glide
    compile 'com.github.bumptech.glide:glide:3.7.0'

    //Displaying images
    compile 'com.github.bumptech.glide:glide:3.7.0'

    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:support-v7:25.0.3'
    compile 'com.android.support:design:25.3.1'
    compile 'com.android.support:recyclerview-v7:25.3.1'
    compile 'com.google.code.gson:gson:2.6.2'
    compile 'com.squareup.retrofit2:retrofit:2.0.2'
    compile 'com.squareup.retrofit2:converter-gson:2.0.2'
    compile 'com.google.firebase:firebase-database:10.0.1'
    compile 'com.google.firebase:firebase-auth:10.0.1'
    //Firebase UI
    compile 'com.firebaseui:firebase-ui-auth:0.6.0'

    testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'

The error is shown in this line

compile 'com.android.support:appcompat-v7:23.4.0'

Error message:

All com.android.support libraries must use the exact same version specification(mixing versions can lead to runtime crashes).Found versions 25.3.1,23.4.0.Examples include
com.android.support:animated-vector-drawable:25.3.1 and
com.android.support:cardview-v7:23.4.0  
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
  • Is there any reason to not use `compile 'com.android.support:appcompat-v7:25.3.1'` to avoid conflict? – Siu Jul 12 '17 at 08:05
  • Possible duplicate of [All com.android.support libraries must use the exact same version specification](https://stackoverflow.com/questions/42374151/all-com-android-support-libraries-must-use-the-exact-same-version-specification) – Vadim Kotov Jul 12 '17 at 13:18

1 Answers1

0

Use same version to all dependencies of support libraries. In your case change these dependency version to "25.3.1".

compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:support-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
Akash Patel
  • 2,757
  • 1
  • 22
  • 30