我对创建矢量图像很陌生。我开始学习如何创建它们,因为我需要一些用于我目前正在开发的 Android 应用程序的自定义图标。问题就从这里开始了。我正在使用 Inkscape 创建图标,当我尝试使用 Android Studio 将它们转换为 VectorDrawable 时,它返回有关不支持某些内容的错误:
ERROR@ line 22 <defs> is not supported
WARNING@ line 139 We don't scale the stroke width!
WARNING@ line 144 We don't scale the stroke width!
WARNING@ line 150 We don't scale the stroke width!
WARNING@ line 156 We don't scale the stroke width!
WARNING@ line 162 We don't scale the stroke width!
WARNING@ line 168 We don't scale the stroke width!
WARNING@ line 174 We don't scale the stroke width!
我首先尝试以某种方式将路径转换为 Inkscape 中的对象,但这没有奏效。然后我在网上找了一些解决方案,找到了以下网站:http: //inloop.github.io/svg2android/ 在那里我可以转换图标,但现在我只能使用它 android 7.0 及更高版本,因为我使用了属性'填充规则:偶数'。
现在这是我的问题:如何确保在创建图标时只使用正确的属性以及如何使我的图标在 android 上工作?
如果您想按照我的尝试解决问题,可以在这里下载我的 SVG 文件:https ://dl.dropboxusercontent.com/u/213285061/Foren/Biologie_Icon.svg
谢谢你的每一个建议。