我正在开发一个同时适用于iOS和安卓的应用程序。闪屏有一个JSON动画。在iOS中,动画效果很好,但在安卓系统中,同样的动画运行速度很慢。有没有人体验过?
注意:动画没有任何图片资源。
我收到了一些错误日志,但它们似乎不相关,因为我已经尝试了其他没有延迟的动画,它显示了相同的错误。
以下是错误:
W/LOTTIE: Lottie doesn't support layer effects. If you are using them for fills, strokes, trim paths etc. then try adding them directly as contents in your shape.
Found: [Radial Shadow]
W/LOTTIE: Animation contains merge paths. Merge paths are only supported on KitKat+ and must be manually enabled by calling enableMergePathsForKitKatAndAbove().发布于 2018-08-31 19:51:52
正如您的警告消息所说,尝试设置enableMergePathsForKitKatAndAbove()。
例如,在xml中-
<com.airbnb.lottie.LottieAnimationView
...
...
...
app:lottie_enableMergePathsForKitKatAndAbove="true"/>或者,在Java中-
lottieAnimationView.enableMergePathsForKitKatAndAbove(true);https://stackoverflow.com/questions/51493427
复制相似问题