Android Studio 3.0 矢量绘图和 LINT 工具 :ignore ="VectorPath"

标签 android lint android-vectordrawable

升级到 3.0 后,Android Studio 开始提示矢量绘图中的路径过长。

警告说:

Very long vector path (7958 characters), which is bad for performance. Considering reducing precision, removing minor details or rasterizing vector. less... (⌘F1) Using long vector paths is bad for performance. There are several ways to make the pathData shorter: * Using less precision * Removing some minor details * Using the Android Studio vector conversion tool * Rasterizing the image (converting to PNG)

文档 https://developer.android.com/guide/topics/graphics/vector-drawable-resources.html向我们展示了如何在我们的应用程序中使用矢量可绘制对象,并推荐它优于 png 等。

我一直在使用 Android Studio Vector Conversion Tool 和这项将 SVG 转换为矢量绘图的出色服务: http://inloop.github.io/svg2android/

是否有其他服务可以更有效地降低矢量可绘制对象的复杂性? 我在哪里可以找到关于我的矢量绘图可以有多“高级”的指南?

最佳答案

尝试使用 avocado 优化矢量可绘制对象!它应该有助于降低路径的复杂性。

关于Android Studio 3.0 矢量绘图和 LINT 工具 :ignore ="VectorPath",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47134101/

相关文章:

使用模式的 Android 字符串替换

android - 尝试在 customListAdapter 上设置一个 TextView 时,应用程序强制关闭

c - 分配给更广泛的基本类型的表达式

android - 将 SVG 转换为 Android Vector Drawable

android - Android API 16 及更高版本上图层列表中的矢量可绘制对象

android - 单击时以编程方式更改矢量 Assets 颜色

java - Android 蓝牙连接 - 服务发现失败

java - 如何让 Java maven 构建因编译器警告而失败?

javascript - JSLint 可以离线使用吗?

java - 根据在 Spinner 中选择的值设置 imageView src