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

eny*_*iaa 15 svg android vector-graphics android-studio

我一直在使用新的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
Run Code Online (Sandbox Code Playgroud)

有谁知道这样做的原因是什么?它是在矢量资源工具的错误?或者也许是Inkscape创建的svgs问题?或者是不支持更复杂的svgs?

谢谢!

Pau*_*eau 14

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

他们在公告视频中说明了这一点.他们说他们打算改善进口商.

但另请注意,VectorDrawables中不支持渐变.