简体   繁体   English

序言中不允许使用 Android Studio 矢量资产工具内容

[英]Android Studio Vector Asset Tool Content not allowed in prolog

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.为了确保没有调整大小的问题,我想使用 SVG 文件并使用 Android Studios 内置工具创建矢量资产。

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.但是,当我想使用“新建”>“矢量资产”然后“本地文件”创建资产并提供到我的 SVG 文件的路径时,我收到以下错误: Error while parsing logo.svg: Content is not allowed in prolog.出错: Error while parsing logo.svg: Content is not allowed in prolog. . .

I created my SVG file using Paint and my logos PNG file.我使用 Paint 和我的徽标 PNG 文件创建了我的 SVG 文件。 I simply saved the file as SVG in the same path with the same name.我只是将文件保存为同名的 SVG 文件。 I saved both files PNG and SVG in the drawable folder.我将文件 PNG 和 SVG 都保存在drawable文件夹中。

Any help is much appreciated, thank you in advance.非常感谢任何帮助,在此先感谢您。

I resolved the problem.我解决了这个问题。

Opening a PNG file in Paint and simply exporting it as SVG does not do the trick.在 Paint 中打开一个 PNG 文件并简单地将其导出为 SVG 并不能解决问题。 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.我让我的图形设计师将 PNG 文件转换为 SVG,然后我就可以使用内置工具毫不费力地创建矢量资产。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM