【问题标题】:resource android:style/TextAppearance.Material.Notification not found on adding dataBinding tag在添加 dataBinding 标记时找不到资源 android:style/TextAppearance.Material.Notification
【发布时间】: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'
}

【问题讨论】:

    标签: java android


    【解决方案1】:

    将 compileSdkVersion 版本从 18 更新到 29

    【讨论】:

    • 谢谢,这就是解决方案。一点都不明显。
    猜你喜欢
    • 2018-11-07
    • 1970-01-01
    • 1970-01-01
    • 2016-03-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-10
    • 1970-01-01
    相关资源
    最近更新 更多