问题
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