使用Android studio 3.5.0 导入一个项目(比较久的), 编译错误:

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

最后是把 build.gradle 的targetSdkVersion 从 23 改成 26,  即 :  targetSdkVersion 26

具体原理还不懂,后续再看看 ^

可以参考 stackoverflow 大牛的帖子:

https://stackoverflow.com/questions/51973681/aapt-error-resource-androidattr-colorerror-not-found

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐