I'm trying to get rid of the soon-to-be-removed option android.enableAapt2=false
from our project. It's been painful, but I hope I'm getting there.
Now I'm stuck with a BuildException: Failed to process resources, see aapt output above for details
.
The issue seems to be this:
error: style attribute '@android:attr/textColor' not found.
Message{kind=ERROR, text=error: style attribute '@android:attr/textColor' not found.,
sources=[/Users/<username>/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/4215c9c9bb2efc5bb086ff343ac44128/res/values/values.xml],
original message=, tool name=Optional.of(AAPT)}
I've found the following question and answer, but I believe it's a bit different when it's not in our own project it's happening: Cannot complete Gradle Build, failed linking references
What's the reason for this happening and how can I solve it?
The specs:
Android Studio 3.1.2
JRE: 1.8.0_152-release-1024-b01 x86_64
buildToolsVersion: 27.0.3
Gradle: 4.6
Gradle plugin: 3.1.2
Edit:
Just in case I removed every single line of styles and attributes from our project and did a clean build and invalidation of cache and restart and everything, but the build was still pointing its finger at the values.xml
of com.android.support:appcompat-v7:27.1.1
.