android - 缺少支持库 v7 23

标签 android android-support-library

在我的 Android 工作室中,我只能看到版本 25.0.0 的支持库,但是当我尝试添加 com.android.support:recyclerview-v7:23.0.4 时,我的编译 SDK 版本是 23 我收到一条错误消息

Error:(27, 13) Failed to resolve: com.android.support:recyclerview-v7:23.0.4

但根据 SDK 管理器,它显示我已经安装了所有支持库。

除此之外,我无法在菜单中找到 v7:23.0.4

文件 => 项目结构 => 依赖项

这是截图

enter image description here

enter image description here

我的问题

  1. 为什么我看不到版本 v7:23.0.4 的支持库?

  2. 如果没有安装支持库,为什么它没有显示在我的 SDK 管理器中?

编辑 1

Build.gradle(Module.app)

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "appnotic.quicknotes"
        minSdkVersion 18
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:25.0.2'
}

编辑 2 enter image description here

最佳答案

1) 它在存储库中不可用,为什么?我不知道,但这不是版本 23 的最新版本,请尝试 com.android.support:recyclerview-v7:23.2.1

2) 您不使用 SDK 管理器安装库,它只安装 gradle 从中获取库的源代码,库本身在您构建时下载

我尝试使用 23.0.4 无法获取,使用 23.2.1 可以。如果您可以获得版本 25.0.0,则意味着存储库已安装,也许 gradle 项目不知何故搞砸了。尝试删除项目 iml 文件和 .idea 文件夹并重新创建。

关于android - 缺少支持库 v7 23,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42678282/

相关文章:

android - 提供替代资源

android - GestureDetector 不起作用(来自 android 开发人员的示例)

Android - Cordova 版本代码问题

android - 从多个纬度/经度获取多个地址

android - ActivityOptionsCompat 不适用于 android 2.3

java - 插件 Android 支持异常

android - 如何在 Jetpack Compose 中通过单击按钮显示 snackbar

android - @style/PreferenceThemeOverlay 的 PreferenceFragmentCompat 填充问题

android - 为旧平台运行 Android 示例 EffectiveNavigation 时出现 ClassNotFindException

android - Appcompat v7 和 ActionBarActivity