Shekar
Shekar

Reputation: 159

error while adding recyclerview library in dependencies

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'
}

Upvotes: 1

Views: 350

Answers (2)

Joshua chirchir
Joshua chirchir

Reputation: 1

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'
}

Upvotes: 0

AskNilesh
AskNilesh

Reputation: 69709

Use same version of dependencies

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

Upvotes: 1

Related Questions