Android Studio Vector Asset Tool Content not allowed in prolog

做~自己de王妃 提交于 2020-02-07 02:35:15

问题


I am trying to create a splash screen for one of my apps with it's logo and my companies logo on it. To make sure I get no resizing problems I wanted to use SVG files and create a vector asset using the Android Studios built in tool.

However when I want to create an asset using New > Vector Asset and then Local File and provide the path to my SVG file I get following error: Error while parsing logo.svg: Content is not allowed in prolog..

I created my SVG file using Paint and my logos PNG file. I simply saved the file as SVG in the same path with the same name. I saved both files PNG and SVG in the drawable folder.

Any help is much appreciated, thank you in advance.


回答1:


I resolved the problem.

Opening a PNG file in Paint and simply exporting it as SVG does not do the trick. I asked my graphic designer to convert the PNG files to SVG and then I was able to use the built in tool to create a vector asset with no effort.



来源:https://stackoverflow.com/questions/59911183/android-studio-vector-asset-tool-content-not-allowed-in-prolog

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!