Internal error parsing svg file in android studio

后端 未结 11 1621
借酒劲吻你
借酒劲吻你 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:27

    UPDATE December 23, 2018

    Base on issuetracker seems this bug fixed in Android Studio 3.2 Canary 5 and above so update your android studio is another way to fix! now i use version 3.2.1 and work fine.

    OLD ANSWER

    Finally i found solution. I don't know what going on but i have same problem and fixed when i download same svg again and open it with notepad++ and export it with different name as svg! and it's work!

    EDIT

    If you use flat icon for download svg, before download just click on edit and then download! this svg work fine in android studio.

    I have android studio 3.1.1

    This just a bug in android studio

    EDIT 2

    There is another bug in decimal numbers in svg viewBox that can be fixed by change decimal to integer (thanks to crgarrido)

    Sample :

    Change decimal numbers to integers numbers in svg file header

    
    

    Change 135.4 to 135

提交回复
热议问题