android - 找不到错误 :resource style/TextAppearance. Compat.Notification.Info(又名 {packageId}.test :style/TextAppearance. Compat.Notification.Info)

标签 android gradle synchronization

我刚刚将 build.gradle 编译 SDK 更新为 27 API。

compileSdkVersion 27
buildToolsVersion '27.0.3'
targetSdkVersion 27

但是一旦我点击同步按钮它就​​会抛出

error: resource style/TextAppearance.Compat.Notification.Info (aka  {packageId}.test:style/TextAppearance.Compat.Notification.Info) not found.
error: resource style/TextAppearance.Compat.Notification.Info (aka  {packageId}.test:style/TextAppearance.Compat.Notification.Info) not found.
error: resource style/TextAppearance.Compat.Notification.Info (aka  {packageId}.test:style/TextAppearance.Compat.Notification.Info) not found.
error: resource style/TextAppearance.Compat.Notification (aka  {packageId}.test:style/TextAppearance.Compat.Notification) not found.
error: resource style/TextAppearance.Compat.Notification (aka  {packageId}.test:style/TextAppearance.Compat.Notification) not found.
error: resource style/TextAppearance.Compat.Notification (aka  {packageId}.test:style/TextAppearance.Compat.Notification) not found.
error: resource style/TextAppearance.Compat.Notification.Time (aka  {packageId}.test:style/TextAppearance.Compat.Notification.Time) not found.
error: resource style/TextAppearance.Compat.Notification.Time (aka  {packageId}.test:style/TextAppearance.Compat.Notification.Time) not found.
error: resource style/TextAppearance.Compat.Notification.Time (aka {packageId}.test:style/TextAppearance.Compat.Notification.Time) not found.
error: resource style/TextAppearance.Compat.Notification.Title (aka {packageId}.test:style/TextAppearance.Compat.Notification.Title) not found.
error: resource style/TextAppearance.Compat.Notification.Title (aka  {packageId}.test:style/TextAppearance.Compat.Notification.Title) not found.
error: resource style/TextAppearance.Compat.Notification.Title (aka  {packageId}.test:style/TextAppearance.Compat.Notification.Title) not found.
error: failed linking references.

但是 SDK 26 的构建过程没问题

最佳答案

之前:

android:textAppearance="@style/TextAppearance.AppCompat.Notification"

现在以下是正确的:

android:textAppearance="@style/TextAppearance.Compat.Notification"

开始于:

compileSdkVersion 27
buildToolsVersion "27.0.3" 
minSdkVersion 19 
targetSdkVersion 27

关于android - 找不到错误 :resource style/TextAppearance. Compat.Notification.Info(又名 {packageId}.test :style/TextAppearance. Compat.Notification.Info),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48241620/

相关文章:

安卓平板应用兼容性

android - 从google账号获取用户名、头像

android - 重构程序包名称和重命名applicationID仍然使gradle失败

groovy - 在Gradle中进行项目

c++ - 使用 pthread_cond_broadcast 并行执行?

javascript - 使用 Jquery/Javascript 使用加/减按钮同步两个输入

synchronization - 在 Azure SQL 数据库上插入非常慢

java - Gradle 传递存储库和凭据

java - 如何将公历转换为中国农历?

android - 程序类型已经存在 : com. google.common.util.concurrent.ListenableFuture