在 Android Studio 中,SVG 无法正确转换为具有高视口的 XML Drawable

SVG not correctly converting to an XML Drawable with a high viewport in Android Studio

我这里有 SVG:https://github.com/Tick-Talk/tick-talk.github.io/blob/master/ticktalk-logo.svg

在 Android Studio 中,我右键单击 drawables,新建 -> 矢量资产,保持大小不变​​(因为它已经是 108dp,我需要的应用程序图标大小),然后导入。生成的 XML Drawable 完全不正确,在 android 工作室和我的 phone 上都显示不正确。

我是不是做错了什么,或者这是在 Android Studio 中处理高视口尺寸(svg 的两个尺寸都有近 3000 像素)时的错误?

我如何才能正确地将此 SVG 转换为 XML 格式,而不会遇到我面临的奇怪问题?

提前致谢!

不幸的是,Android 矢量绘图规范不支持 SVG 的所有功能。也就是说,还有一些其他在线工具可用于将 SVG 转换为 XML,它们通常非常适合转换不受支持的功能。

This one 很好地告诉您不支持的内容,它可以为您提供一些选项来尝试更正问题。例如,对于您的图标,它会报告以下内容:

Warning #1: found clip-path(s) attribute which is not fully supported yet (try enabling support for clip-path below)

Warning #2: stroke-width not found on path one or more times. Defaulting all instances to 1.

它还会显示转换后的代码。

This one 转换,显示转换后的代码,并显示图形预览。