为什么我还在为RecyclerView错误安装存储库?

时间:2016-01-10 07:12:33

标签: android android-studio android-recyclerview android-support-library

我正在关注使用Recycler View的指南,我在宣布依赖关系并将RecyclerView安装到Android Studio时遇到了问题。

我将RecyclerView添加到我的xml文件中并在build.gradle中声明了依赖项(下面)

apply plugin: 'com.android.application'
android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"
    defaultConfig {
        applicationId "com.ryde.chris.ryde"
        minSdkVersion 15
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile 'com.android.support:design:22.2.1'
    compile 'com.android.supportrecyclerview-v7:23.0.0'
}

我重建了应用并尝试安装Recycler View repo。在安装时,我遇到了与此user完全相同的问题。

我看了那个帖子的答案。我选择使用RecyclerView v 23.0.0并确保我使用api版本23编译(build.gradle中的compileSdkVersion 23)。使用AVD管理器,我还确保安装并更新了我的api版本23支持库enter image description here

有谁知道我为什么还会遇到这个问题?互联网工作正常(具体而言)enter image description here

2 个答案:

答案 0 :(得分:3)

更改

compile 'com.android.supportrecyclerview-v7:23.0.0'

compile 'com.android.support:recyclerview-v7:23.0.0' 

答案 1 :(得分:1)

使用新版本:

compile 'com.android.support:recyclerview-v7:23.1.1'
相关问题