【问题标题】:Why am I still getting installing repository for RecyclerView error?为什么我仍在安装 RecyclerView 错误的存储库?
【发布时间】:2016-04-14 16:02:29
【问题描述】:

我正在遵循使用 Recycler View 的指南,但在声明依赖项并将 RecyclerView 安装到 Android Studio 中时遇到了问题。

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

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 存储库。安装时,我遇到了与 user 完全相同的问题。

我查看了该线程上的答案。我选择使用 RecyclerView v 23.0.0 并确保我使用 api 版本 23(build.gradle 中的 compileSdkVersion 23)进行编译。使用 AVD 管理器,我还确保安装并更新了我的 api 版本 23 的支持库

有谁知道为什么我仍然遇到这个问题?互联网工作正常(具体来说)

【问题讨论】:

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


    【解决方案1】:

    改变

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

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

    【讨论】:

    • 你一定要小心!
    【解决方案2】:

    使用新版本:

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

    【讨论】:

      猜你喜欢
      • 2020-02-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-13
      • 2023-01-10
      • 2016-11-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多