Android Studio矢量资产导入错误 - 不支持的标记

时间:2015-10-14 16:13:23

标签: android svg android-studio vector-graphics

我一直在使用新的gradle插件测试Andorid Studio - 1.4.0-beta3。

我一直在尝试导入我自己的Inkscape制作的矢量资源。但是我不断收到导入错误。错误消息包括svg中许多不支持的标记。

In mm_card.svg:
ERROR@ line 54 <defs> is not supported
ERROR@ line 56 <linearGradient> is not supported
ERROR@ line 58 <stop> is not supported
ERROR@ line 62 <stop> is not supported
ERROR@ line 66 <stop> is not supported
ERROR@ line 70 <stop> is not supported
ERROR@ line 74 <stop> is not supported
ERROR@ line 78 <stop> is not supported
ERROR@ line 83 <linearGradient> is not supported
ERROR@ line 85 <stop> is not supported
ERROR@ line 89 <stop> is not supported
ERROR@ line 93 <stop> is not supported
ERROR@ line 97 <stop> is not supported
ERROR@ line 102 <linearGradient> is not supported
ERROR@ line 104 <stop> is not supported
ERROR@ line 108 <stop> is not supported
ERROR@ line 113 <linearGradient> is not supported
ERROR@ line 115 <stop> is not supported
ERROR@ line 119 <stop> is not supported
ERROR@ line 123 <stop> is not supported
ERROR@ line 127 <stop> is not supported
ERROR@ line 131 <stop> is not supported
ERROR@ line 135 <stop> is not supported
ERROR@ line 139 <stop> is not supported

有谁知道这个的原因?它是矢量资产工具中的错误吗?或者也许是Inkscape创建的svgs问题?或者是不支持更复杂的svgs?

谢谢!

1 个答案:

答案 0 :(得分:13)

Android Studio中的SVG导入功能仅对某些SVG功能提供有限的支持。

他们在their announcement video中说明了这一点。他们说他们打算改善进口商。

但是请注意,VectorDrawables中不支持渐变。