Android Studio矢量资产导入错误-不支持的标签 [英] Android Studio Vector Asset Import Error - Tags Not Supported

查看:381
本文介绍了Android Studio矢量资产导入错误-不支持的标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I've been testing out Andorid Studio with the new gradle plugin - 1.4.0-beta3.

我一直在尝试导入自己用Inkscape制作的矢量素材.但是我一直收到导入错误.错误消息在svg中包含许多不支持的标签.

I've been trying to import my own vector assets, made in Inkscape. However I keep getting import errors. The error message includes lots of tags in the svg that arn't supported.

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创建的svg存在问题?还是不支持更复杂的svg?

Does anyone know the cause of this? Is it an error in the vector asset tool? Or perhaps a problem with svgs created by Inkscape? Or are more complicated svgs not supported?

谢谢!

推荐答案

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

The SVG import feature in Android Studio has only limited support for some SVG features.

他们在他们的公告视频中声明了尽可能多的内容.他们说他们打算改善进口商.

They state as much in their announcement video. They say they intend to improve the importer.

但也请注意,VectorDrawables始终不支持渐变.

But also note that gradients are not supported in VectorDrawables anyway.

这篇关于Android Studio矢量资产导入错误-不支持的标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆