ali mazaheri
ali mazaheri

Reputation: 217

Failed to resolve: recyclerview

While adding dependency implementation 'com.android.support:recyclerview-v7:28.0.0' to my project, Android Studio throws exception ERROR: Failed to resolve: recyclerview. Then I tried adding dependency for recyclerview. Still getting same error.

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    buildToolsVersion "29.0.2"
    defaultConfig {
        applicationId "com.itook.myapplication"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.background.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:design:28.0.0'
    implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
    implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.10'




    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
    implementation 'com.squareup.picasso:picasso:2.5.2'
    implementation 'com.android.support:recyclerview-v7:28.0.0'
    implementation 'com.github.florent37:bubbletab:1.0.2'
    implementation 'com.android.support:design:28.0.0'
    implementation 'junit:junit:4.12'
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.ss.bannerslider:bannerslider:1.8.0'
    implementation 'com.github.hamsaadev:Persian-Date-Picker-Dialog:V1.2'
    implementation 'com.anton46:stepsview:0.0.2'
    implementation 'pub.devrel:easypermissions:2.0.1'
    implementation 'com.google.android.gms:play-services-maps:16.1.0'
    implementation 'com.google.android.gms:play-services-location:16.0.0'
    implementation 'com.zarinpal:purchase:0.0.8-beta'
    implementation 'com.github.bumptech.glide:glide:3.7.0'
}

Upvotes: 4

Views: 1690

Answers (2)

Ashish
Ashish

Reputation: 6919

Your project migrated to android x

Use this:

implementation 'com.google.android.material:material:1.0.0'

Instead of

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

Then you don't have to implmenet different library of Design. It will add all library.

Upvotes: 3

Rahul sharma
Rahul sharma

Reputation: 1574

Try this

 implementation 'androidx.recyclerview:recyclerview:1.1.0'

Upvotes: 4

Related Questions