AndroidStudio 3.0 / Android Gradle plugin 3.0
<vector>
<path android:fillColor="@color/image_button_disabled"/>
</vector>
I get this error:
references to other resources are not supported by build-time PNG generation
Will it be possible to resolve it or is it a deprecated solution?
you need to use the hex code directly not referring to a resource.
I've been able to work around this by doing the following:
This way the compiler will work
If your minSdkVersion is 21 you can disable the generation of PNG by adding this line:
Removing this line will still generate the PNGs.
Source: http://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.VectorDrawablesOptions.html
In your app
build.gradle
add the following line:See Android Developers: Vector Drawables Backward Compatibility Solution for details.
Little bit more context for this error:
For support library, add a statement to your build.gradle file:
I think you are using
android:fillColor="@color/image_button_disabled"
this code for vector drawable.It's not supported.
Just replace it with
android:fillColor="#c4ca5e"