0

I'm trying to import the following library:

    implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'

but I get the following error when I sync:

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0-rc01, 27.1.0. Examples include com.android.support:animated-vector-drawable:28.0.0-rc01 and com.android.support:exifinterface:27.1.0...

I tried adding the following but nothing has helped. How do I fix this?

implementation 'com.android.support:exifinterface-28.0.0-rc01'
Isaac Perez
  • 570
  • 2
  • 15
  • 31
  • "I tried adding the following but nothing has helped" -- you should be getting a different error message, one no longer referring to `com.android.support:exifinterface:27.1.0`. Check the new error message and see what it is complaining about. See also: https://stackoverflow.com/a/48066485/115145 – CommonsWare Sep 01 '18 at 14:19
  • Please show your gradle file. – Son Truong Sep 01 '18 at 14:26
  • I get the following: "Failed to resolve: com.android.support:exifinterface-28.0.0-rc01:" Am I trying to import the wrong version number? – Isaac Perez Sep 01 '18 at 14:47

1 Answers1

0

Make Sure you have compileSdkVersion 28 and targetSdkVersion 28 in android block in build.gradle file.

also make sure you have appcompat-v7:28.0.0-rc01 in your dependencies block.

Then i think implementation 'com.android.support:exifinterface:28.0.0-rc01' can be added without any problem.

I am pasting my build.gradle (Module:app) for reference.

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.chirag.example.retrofeitdemo"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    implementation 'com.squareup.retrofit2:retrofit:2.4.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.android.support:exifinterface:28.0.0-rc01'
}
Chirag Sharma
  • 888
  • 6
  • 18