Tag Archives: # Android Error notes

Android Error:AAPT: error: resource android:attr/colorError not found

Android resource linking failed
G:\work\viewPager\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:622: error: resource color/colorPrimary (aka com.example.viewpager:color/colorPrimary) not found.
G:\work\viewPager\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:623: error: resource color/colorPrimaryDark (aka com.example.viewpager:color/colorPrimaryDark) not found.
G:\work\viewPager\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:624: error: resource color/colorAccent (aka com.example.viewpager:color/colorAccent) not found.
error: failed linking references.

Reason

25 below compileSdkVersion implementation ‘com. Android. Support: appcompat – v7:27.0.0’ version of the support.
error is usually reported when the compiled version of SDK is lower than the version in the support package, but this is not always true. The error is usually reported when the resource file in the higher version of support package is not found in the lower version of SDK.

solution

changes the compileSdkVersion to be consistent with support, and it is recommended to change the compileSdkVersion 27