While researching Lottie recently, I found that the AE exported files do not support gradients, but I looked at the Android source code and found that it does, but why does it not work?

The following is an experiment based on bodyMovement version 5.7.8

I have drawn a gradient shape in after Effects with the following effects and parameters

You can see a 3-color linear gradient graph as simple as viewing the parameters in JSON

Here I found that I matched with 3 color gradient results only two colors, I feel that there should be a problem with bodymovin export. After checking and experimenting, it was found that the layer name was the problem. It was found that the name must be in English and gradient. There was no problem with the previous paragraphs matching gr or Gra, but the specific matching logic was not clear (only go to see the source code of Bodymovin). No other text can be added before or after

And you can see that there are a lot more points in the exported JSON so here’s the tri-color gradient and there are actually five points, two of which are color midpoints

Pay attention to

In fact, there is a problem here, bodymovin has not been solved, as you can see below I have shifted the color midpoint, but it can be seen from json that the position has not moved, it is always the midpoint of the two colors, that is to say, it is invalid to change the midpoint

Finally want to ridicule, how can there be this bug😥, hope to repair it as soon as possible