首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >属性/颜色使用com.android.support:recyclerview-v7:26.0.0-beta2时找不到错误

属性/颜色使用com.android.support:recyclerview-v7:26.0.0-beta2时找不到错误
EN

Stack Overflow用户
提问于 2017-06-20 12:38:44
回答 7查看 62.2K关注 0票数 68

我使用的是Android Studio 3.0 Canary 4,我导入了回收器视图库。然后它会显示attr/colorError not found消息。这是应用程序build.gradle:

代码语言:javascript
复制
apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.3"
    defaultConfig {
        applicationId "com.robyn.myapplication"
        minSdkVersion 19
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    testImplementation 'junit:junit:4.12'
    implementation 'com.android.support:recyclerview-v7:26.0.0-beta2'
    implementation 'com.android.support:appcompat-v7:26.0.0-beta2'
}

每当我添加两个库implementation 'com.android.support:recyclerview-v7:26.0.0-beta2‘和implementation 'com.android.support:appcompat-v7:26.0.0-beta2',时,它都会显示以下错误消息:

我尝试了清理和重建,错误信息仍然存在。我检查了res/ values /colors,颜色值在那里。为什么我得到这个颜色错误?如果我想使用回收器视图,我应该导入什么版本的库?

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44643943

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档