I'm aware this question has been asked before, but I'm new to Android and Java in general. I've gone through the previous questions and tried various solutions but never seems to work.
I'm getting the "all com.android.support libraries must use the exact same version specification" warning in my app gradle file. My dependencies are:
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.tberwick.hishhash"
minSdkVersion 19
targetSdkVersion 26
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(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:animated-vector-drawable:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation "android.arch.persistence.room:runtime:1.0.0"
annotationProcessor "android.arch.persistence.room:compiler:1.0.0"
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
implementation "android.arch.lifecycle:extensions:1.0.0"
annotationProcessor "android.arch.lifecycle:compiler:1.0.0"
}
The error I was receiving was
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 27.0.1, 26.1.0. Examples include com.android.support:animated-vector-drawable:27.0.1 and com.android.support:recyclerview-v7:26.1.0 less... (⌘F1) There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion.)
So I added in the specific line implementation 'com.android.support:animated-vector-drawable:26.1.0'
but I still see the same error after syncing.
I've noticed that if I view my .idea/libraries folder that the app-compact and vector-drawable xml files in there get created for version 27.0.1 even though my versions are specified as 26.1.0
As I say I know this has been asked before but what I believe the solution should be based on those answers doesn't seem to work. I don't think I should use the versions 27.0.1 either as doing this complains about my targetSdkVersion (which I do understand)