我使用的是Android Studio 3.0 Canary 4,我导入了回收器视图库。然后它会显示attr/colorError not found消息。这是应用程序build.gradle:
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,颜色值在那里。为什么我得到这个颜色错误?如果我想使用回收器视图,我应该导入什么版本的库?
https://stackoverflow.com/questions/44643943
复制相似问题