【发布时间】:2021-11-22 20:37:46
【问题描述】:
我正在使用 Android Studio,我正在尝试使用 google 材料库
我收到以下错误(Android 资源链接失败):
错误:AAPT:C:\Users\ANDRES\Desktop\cursillo_android\TipTime2\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v31\values-v31.xml:3:错误:资源 android :color/system_neutral1_1000 未找到。
Mi成绩文件是:
plugins {
id 'com.android.application'
id 'kotlin-android'
}
android {
compileSdk 30
compileSdkVersion 30
defaultConfig {
applicationId "com.example.tiptime2"
minSdk 24
targetSdk 30
versionCode 1
versionName "1.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
viewBinding = true
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation 'com.google.android.material:material:1.5.0-alpha05'
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.3"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
我想与您分享错误的图片:
谢谢
【问题讨论】:
标签: android android-studio kotlin material-components-android