微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

AAPT:错误:未找到资源android:attr / colorError

我在NativeScript项目上执行“ tns run android”,但出现以下错误

C:\Users\jim\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.2.aar\462a                                                                                                                 922193e097e31bddc3aa6795fc06\res\values-v26\values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.

C:\Users\jim\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.2.aar\462a                                                                                                                 922193e097e31bddc3aa6795fc06\res\values-v26\values-v26.xml:13:5-16:13: AAPT: error: resource android:attr/colorError not found.

C:\Users\jim\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.2.aar\462a                                                                                                                 922193e097e31bddc3aa6795fc06\res\values-v26\values-v26.xml:17:5-93: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.

C:\Users\jim\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.2.aar\462a                                                                                                                 922193e097e31bddc3aa6795fc06\res\values\values.xml:252:5-69: AAPT: error: resource android:attr/fontStyle not found.

C:\Users\jim\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.2.aar\462a                                                                                                                 922193e097e31bddc3aa6795fc06\res\values\values.xml:252:5-69: AAPT: error: resource android:attr/font not found.

C:\Users\jim\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.2.aar\462a                                                                                                                 922193e097e31bddc3aa6795fc06\res\values\values.xml:252:5-69: AAPT: error: resource android:attr/fontWeight not found.

FAILURE: Build Failed with an exception.

* What went wrong:
Execution Failed for task ':app:processDebugResources'.
> Failed to process resources, see aapt output above for details.

我是NativeScript和Android开发的新手.调试/修复此错误的建议步骤是什么?

解决方法:

我相信colorError是在支持版本28.0.0中引入的.因为看起来您正在使用27.0.2,所以可以只使用textColorError.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐