Java utility fixes Gradient has no stop info
error when importing SVG files as vector assets in Android studio. This error results in corrupt drawable with empty gradient fills.
-
Download binary from releases/latest
-
Pass target SVG file name as parameter:
./bin/svg-non-stop my_vector_drawable.svg
-
Result will be saved in
my_vector_drawable_nonstop.svg
. Use this file to import in IDE.
Optional parameters:
-f
to force overwrite target_nonstop.svg
file,-v
to have verbose output.
Utility copies stops definitions into target gradients in SVG file. Then IDE can process file correctly. Utility is not for use in android code.
For build use gradle assemble
task and you will get build/distributions/svg-non-stop-x.y.z.zip
archive.