18

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

Zoe stands with Ukraine
  • 25,310
  • 18
  • 114
  • 149
Mani devs
  • 335
  • 3
  • 10

3 Answers3

29

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
Blackbam
  • 14,898
  • 22
  • 85
  • 134
pmichaelro
  • 306
  • 3
  • 2
12

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

\{userFolder}\.gradle\caches

delete cached libraries in windows

saber tabatabaee yazdi
  • 3,175
  • 3
  • 39
  • 52
Mario Velasco
  • 3,216
  • 2
  • 31
  • 50
  • In my case, the build failure seemed to happen after no real change to code or migration to a new SDK, I was moving around projects quite a bit. I also got several strange locked file messages. Regardless, clearing this cache solved the issue. – Michael Marsella Jun 20 '19 at 20:23
2

in my case i have added this line in gradle if u still want to use support libraries instead of AndroidX

implementation 'com.android.support:support-v4:28.0.0'
Mudassir Khan
  • 1,664
  • 1
  • 18
  • 25