Why is my SVG failing to load in Vector Asset Studio
My SVG was being created (from an online website) with ,
in the viewbox
tag.
i.e:
viewBox="0, 0, 350,450"
changing this to:
viewBox="0 0 350 450"
allowed Android Studio to import it
You need to change the width and height of the svg from mm
to use px
instead. This is a current workaround pending when the issue is fixed.
There is already a filed bug report here
After spending some hours, I figured out the problem, and even using external svg2vectordrawable scripts couldn't help.
The size of the shapes and/or the document's page size cannot contain floating numbers in its width/height such as 14.134 or 3.5
Meaning the width and height of the shape and the page must be integers!
Android Studio's Vector Asset Studio is currently not support all the features of SVG. You can convert SVG to VectorDrawable using this tool.
Hope it helps.