同于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的设备的支持。