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
  • 27,060
  • 21
  • 118
  • 148
jafar
  • 345
  • 4
  • 11

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
  • 17,496
  • 26
  • 97
  • 150
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
  • 4,404
  • 3
  • 42
  • 58
Mario Velasco
  • 3,336
  • 3
  • 33
  • 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,714
  • 1
  • 20
  • 25