1

I just installed android studio 3.0.1. Error throws while adding com.android.support:recyclerview-v7:28.0.0-alpha1 library in dependencies. After searching for solution I found that there is a mismatch in versions. compileSdkVersion is 26 and recylerview version is v7:28.0.0-alpha1. How do I get older versions of recyclerview which is compatible with compileSdkVersion 26. OR is there any other simple way to resolve this issue.

The error is:

error: resource android:attr/fontVariationSettings not found.

error: resource android:attr/ttcIndex not found.

build.gradle code is:

android {
compileSdkVersion 26
defaultConfig {
    applicationId "com.example.myapplication"
    minSdkVersion 15
    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'
    }
}
buildToolsVersion '26.0.2'
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7: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 'com.android.support:recyclerview-v7:28.0.0-alpha1'
}
Shekar
  • 149
  • 3
  • 14

2 Answers2

1

Use same version of dependencies

implementation 'com.android.support:recyclerview-v7:26.1.0'
AskNilesh
  • 67,701
  • 16
  • 123
  • 163
  • 1
    Thanks Nilesh. Its working. Actually I was thinking libraries are added only from Project Structure >dependencies where I didn't found this version of recylerview. Now I just copied your code and did sysc now and it worked. But where can we find all these version. – Shekar Apr 11 '18 at 12:39
  • @Shekar check this ans https://stackoverflow.com/questions/26028581/how-to-check-what-is-the-latest-version-of-a-dependency-to-use-in-gradle – AskNilesh Apr 11 '18 at 12:42
  • 1
    Once again thanks Nilesh for the reference you provided. – Shekar Apr 11 '18 at 12:48
0
dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')

    implementation 'com.android.support:appcompat-v7:26.1.0'

    implementation 'com.android.support:design:26.1.0'

    implementation 'com.android.support.constraint:constraint-layout:1.1.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:recyclerview-v7:26.1.0'
}
coder
  • 8,346
  • 16
  • 39
  • 53