当我尝试同步Gradle文件时出现以下错误:错误:无法解决:android.recyclerview:recyclerview:受影响的模块:app

问题描述 投票:1回答:1

所以我的Android Studio无法解析RecyclerView。我是android开发人员的新手,请随时提供您认为有用的任何输入。我不确定这是我在存储库中犯的错误还是版本错误。

app gradle:

android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
    applicationId "com.example.hasanat"
    minSdkVersion 21
    targetSdkVersion 29
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
 }
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'android.recyclerview:recyclerview::1.1.0'
//AndroidX
implementation 'androidx.cardview:cardview:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0-alpha03'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-alpha03'

}

构建gradle:

buildscript {
repositories {
    google()
    jcenter()

}
dependencies {
    classpath 'com.android.tools.build:gradle:3.5.0'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
 }
}

allprojects {
repositories {
    mavenCentral()
    google()
    jcenter()

 }
}

task clean(type: Delete) {
delete rootProject.buildDir
}
android-studio gradle android-recyclerview dependencies androidx
1个回答
0
投票

是的,请忽略此。我在回收站视图中发布了一个版本问题。

© www.soinside.com 2019 - 2024. All rights reserved.