Internal error parsing svg file in android studio

后端 未结 11 1636
借酒劲吻你
借酒劲吻你 2020-12-28 12:23

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

11条回答
  •  青春惊慌失措
    2020-12-28 12:38

    I had this error too, and I think I got an answer.

    When you "Add a Vector Asset" in your project, Android Studio creates a .xml file in res/drawable folder.

    So I found this website : http://a-student.github.io/SvgToVectorDrawableConverter.Web/

    You just have to drop your .svg file in the box and wait a few seconds.

    Then, just right click on drawable folder in Android Studio, New -> Drawable resource file, set the icon name, etc... And you finally replace the content by the xml code the website gave you.

    Save the file, and your icon is ready to go !

提交回复
热议问题