AndroidStudio 3.0 / Android Gradle 插件 3.0
<vector>
<path android:fillColor="@color/image_button_disabled"/>
</vector>
我收到此错误:
构建时 PNG 生成不支持对其他资源的引用
是否可以解决这个问题,或者它是一个已弃用的解决方案?
要支持 API SDK build.gradle在 - 的里面android
block:
defaultConfig {
vectorDrawables.useSupportLibrary = true
}
如果您的 minSdkVersion 是 24 或更高,那么您的问题将自行解决,因为 VectorDrawables 从此 API 开始得到全面支持。
See Android 开发人员:Vector Drawables 向后兼容性解决方案 https://developer.android.com/guide/topics/graphics/vector-drawable-resources.html#vector-drawables-backward-solution了解详情。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)