android color属性黑色,无法处理属性android:fillcolor=“@android:color/white”

同于3.3.2/等级-4.10.1

我有同样的编译器问题:

Error: java.lang.RuntimeException: java.lang.RuntimeException: Error while processing .../main/res/drawable/ic_white_set.xml : Can't process attribute android:fillColor="@color/selector_tab_color": references to other resources are not supported by build-time PNG generation.

我打开了被指控的文件,得到了以下lint警告:

Resource references will not work correctly in images generated for this vector icon for API < 21; check generated icon to make sure it looks acceptable.

Inspection info:Vector icons require API 21 or API 24 depending on used features, but when minSdkVersion is less than 21 or 24 and Android Gradle plugin 1.4 or higher is used, a vector drawable placed in the drawable folder is automatically moved to drawable-anydpi-v21 or drawable-anydpi-v24 and bitmap images are generated for different screen resolutions for backwards compatibility. However, there are some limitations to this raster image generation, and this lint check flags elements and attributes that are not fully supported. You should manually check whether the generated output is acceptable for those older devices. Issue id: VectorRaster

然后我检查了我的

build.gradle

文件,当然,他们都有

minSdkVersion

到16。

所以,作为@bhavesh moradiya解决方案的替代方案,我设置了

Minsdk版本

到了21岁,问题就解决了。

缺点是,您将失去对带有sdk<16的设备的支持。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值