Fixed
Status Update
Comments
[Deleted User] <[Deleted User]> #2
I forgot to mention that the log doesn't fail the build.
xa...@google.com <xa...@google.com>
im...@google.com <im...@google.com> #3
Before change Change-Id: I7d6ecd4a6e988e9fdb31849508ab885c4dd060bb the unsupported gradient types were ignored, and treated as "radial" (looks like a fixed bug). That change fixed it, and outputs a warning whenever an unsupported gradient type is used. However, this change is pretty old and should be present starting from 3.1.
im...@google.com <im...@google.com> #4
Sorry, wrong change id, the correct one was Change-Id: Iad267050e851b789775be663a8c84ad3ecb2793c
sp...@google.com <sp...@google.com> #5
Flagging an unsupported gradient type is a desirable behavior since it notifies user of a real problem with the app.
sp...@google.com <sp...@google.com> #6
Reopening since "sweep" is a legitimate gradient type in Android.
sp...@google.com <sp...@google.com> #7
sp...@google.com <sp...@google.com> #8
The warning message is made more clear. Conversion of sweep gradients to bitmaps as part of a build is still approximate. This is determined by limitations of AWT. Sweep gradients are replaced in generated png files by solid colors. The best way to prevent this from happening is to use appcompat since it provides accurate rendering of sweep gradients on versions of Android that don't do it natively and eliminates the need to convert vector drawables to bitmaps at build time.
Description
Task :module:packageDebugResources
>>>>>> Unsupported gradient type: "sweep">>>>>>
There is a single occurence of such a gradient in our build and it seems to be causing an issue and it used to work fine, without such a log. Here is the file:
<vector xmlns:android="
xmlns:aapt="
android:width="120dp"
android:height="120dp"
android:viewportWidth="120"
android:viewportHeight="120">
<path
android:pathData="someData"
android:strokeWidth="4"
android:strokeLineCap="round">
<aapt:attr name="android:strokeColor">
<gradient
android:centerX="60"
android:centerY="60"
android:type="sweep">
<item
android:color="?android:attr/windowBackground"
android:offset="0.0" />
<item
android:color="@color/aColor"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
</vector>
Using ./gradlew -d, the best log I can get is this:
2020-01-10T12:06:30.835-0800 [WARN] [VdPath] >>>>>> Unsupported gradient type: "sweep">>>>>>
I couldn't make sure there is any issue in the packaged application. But the log itself seems abnormal.