Error:resource style/TextAppearance.Compat.Notification.Info (aka {packageId}.test:style/TextAppearance.Compat.Notification.Info) not found

空扰寡人 提交于 2019-11-26 14:36:13

问题


I just updated the build.gradle compile SDK to 27 API.

compileSdkVersion 27
buildToolsVersion '27.0.3'
targetSdkVersion 27

but but once I hit sync button it throws

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.

but the build process was ok with SDK 26


回答1:


Previously:

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

Now the following is correct:

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

Since:

compileSdkVersion 27
buildToolsVersion "27.0.3" 
minSdkVersion 19 
targetSdkVersion 27



回答2:


In my case, I solved it by deleting all cached libraries from Gradle on:

\{userFolder}\.gradle\caches


来源:https://stackoverflow.com/questions/48241620/errorresource-style-textappearance-compat-notification-info-aka-packageid-te

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!