https://kotlinlang.org logo
Title
c

ConorG

10/16/2020, 5:53 AM
Hi! Is anyone aware of differences in how AGP 4.1 processes vectors or declares
vectorDrawables.useSupportLibrary
. My builds fail in with 4.1 due to issues with
Caused by: org.gradle.api.GradleException: Can't process attribute android:strokeColor="@color/white": references to other resources are not supported by build-time PNG generation. File was preprocessed as vector drawable support was added in Android 5.0 (API level 21) See <http://developer.android.com/tools/help/vector-asset-studio.html> for details.
After some googling, it seems this is the stacktrace that showed when ``vectorDrawables.useSupportLibrary`` wasn’t declared (but it definitely is). Rolling back to 4.0.1 builds fine.
Turned out to be a knock-on effect from another issue, `--stacktrace`arg with the build showed that some modules had still be using
BuildConfig.VERSION_NAME
Fixing that issue lead to a successful build eventually. Significant tweet about it, in case anyone missed it: https://twitter.com/molsjeroen/status/1316680184037355523