Vector Drawable with Trim path 通过 ResourceLoader 错误加载

问题描述

我用路径创建了android矢量可绘制资源(.xml)

<path
    android:name="ellipse"
    android:pathData="M 0 -247.5 C 136.69 -247.5 247.5 -136.69 247.5 0 C 247.5 136.69 136.69 247.5 0 247.5 C -136.69 247.5 -247.5 136.69 -247.5 0 C -247.5 -136.69 -136.69 -247.5 0 -247.5 Z"
    android:strokeWidth="48"
    android:strokeAlpha="1"
    android:strokeColor="#01adcd"
    android:strokeLineCap="round"
    android:strokeLineJoin="miter"
    android:strokeMiterLimit="4"
    android:trimPathStart="0"
    android:trimPathEnd="0"
    android:trimPathOffset="0" />

之后,我使用aapt2创建了.apk,使用ResourcesLoader加载上述资源。

但是在输出中,我得到了错误显示 with a dot inside

另一方面,将源 drawable 添加到示例项目并通过 Android Studio 编译它,而没有显式使用 ResourcesLoader,那么 drawable 表示很好,没有错误(中间没有点)。

当trimPathStart 和trimPathEnd = 0 时,strokeLineCap = ”round” 和“square” 会重复这个问题。 有人遇到过这样的问题吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)