【发布时间】:2019-06-17 14:54:14
【问题描述】:
在我的应用级 Gradle 文件中添加 dataBinding 块时,它显示以下错误:
Android resource linking failed
error: resource android:style/TextAppearance.Material.Notification not found.
error: resource android:style/TextAppearance.Material.Notification.Info not found.
error: resource android:style/TextAppearance.Material.Notification.Time not found.
error: resource android:style/TextAppearance.Material.Notification.Title not found.
error: failed linking references.
这个应用程序最初是基于 eclipse 构建的。但现在它在 android studio 上运行。该应用程序在没有dataBinding 块的情况下运行良好。而且style.xml文件没有错误。
// build.gradle (Module:app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 18
buildToolsVersion "29.0.0"
defaultConfig {
applicationId "org.irdresearch.iicsystem"
minSdkVersion 14
targetSdkVersion 14
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_5
targetCompatibility JavaVersion.VERSION_1_5
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
dataBinding {
enabled = true
}
}
dependencies {
implementation 'com.android.support:support-v4:18.0.0'
}
【问题讨论】: