android - 无法解析 : recyclerview

标签 android android-recyclerview

在我的项目中添加依赖实现 'com.android.support:recyclerview-v7:28.0.0' 时,Android Studio 抛出异常 ERROR: Failed to resolve: recyclerview。然后我尝试为 recyclerview 添加依赖项。仍然遇到同样的错误。

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

最佳答案

试试这个

 implementation 'androidx.recyclerview:recyclerview:1.1.0'

关于android - 无法解析 : recyclerview,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59542157/

相关文章:

使用 fragment : Adapter not receiving callback 的 Android Jetpack 分页

android - 为我的模拟器使用 Google Play 服务

java - Toast 到第二个 Activity 的 TextView 的值

android - 不同 ViewType 之间的 NotifyItemMoved 不起作用

android - RecyclerView 项目的按下状态

java - Youtube API集成+RecyclerView(Resources.KEY无法解析)

android - RecyclerView 中的 PercentFrameLayout (要求方形)未显示

android程序的java致命异常

android - 为什么我的白噪声有跳动/爆音/咩咩声?

Android 模拟器找不到我的 Java 类?