Start from this month, I was not able to import any svg file though Vector Asset in my laptop, I always get the msg \'Internal error parsing abc.svg\'
I tried to imp
I solved the problem adding width and height to the svg tag.
Example
From
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 43.42 56.15">
To
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 43.42 56.15" width="24" height="24">
I guess Android Studio can't add vectors from svg files without mentioning the dimensions.
Open your SVG file in Notepad. Round all the decimal values in viewBox ="no decimal values allowed here".
In my case, I had a decimal value indicating the height, rounded it to an integer solved the issue
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 375 135.4">
Changing the 135.4 to a 136 did the job
Update
After that, In the IDE Fatal errors section I constated the following exception:
The vector assert parser fails when you have a decimal dimension, I reported the issue. I hope it will be fixed soon.
I solved my problem by removing the comma separated values in the viewBox
, i.e. I had
viewBox="0, 0, 350,450"
and changing it to
viewBox="0 0 350 450"
allowed it to be imported
I used Gimp and Export Path to produce a simple SVG. It had the width and height as decimal inches. Changing these to the pixel width/height fixed it.