【发布时间】:2018-06-06 06:53:09
【问题描述】:
我正在尝试从我们的项目中删除即将删除的选项android.enableAapt2=false。这很痛苦,但我希望我能到达那里。
现在我被 BuildException: Failed to process resources, see aapt output above for details 困住了。
问题似乎是这样的:
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)}
我找到了以下问题和答案,但我相信当它不在我们自己的项目中时会有所不同:Cannot complete Gradle Build, failed linking references
发生这种情况的原因是什么,我该如何解决?
规格:
Android Studio 3.1.2
JRE:1.8.0_152-release-1024-b01 x86_64
构建工具版本:27.0.3
摇篮:4.6
Gradle 插件:3.1.2
编辑:
以防万一我从我们的项目中删除了每一行样式和属性,并进行了干净的构建和缓存失效和重新启动等所有操作,但构建仍然指向values.xml 的com.android.support:appcompat-v7:27.1.1。
【问题讨论】:
标签: android android-gradle-plugin android-appcompat android-styles