@shizhongyu Please attach your animation and any repro steps.
@gpeal
We're getting very similar errors too. I'll see if I'm allowed to send you the animations publicly. (FWIW, these animations all work on iOS.)
We're also loading these animations using setAnimationFromUrl if it makes a difference.
java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List com.airbnb.lottie.model.content.ShapeData.getCurves()' on a null object reference
at com.airbnb.lottie.model.content.ShapeData.interpolateBetween(ShapeData.java:55)
at com.airbnb.lottie.animation.keyframe.ShapeKeyframeAnimation.getValue(ShapeKeyframeAnimation.java:23)
at com.airbnb.lottie.animation.keyframe.ShapeKeyframeAnimation.getValue(ShapeKeyframeAnimation.java:11)
at com.airbnb.lottie.animation.keyframe.BaseKeyframeAnimation.getValue(BaseKeyframeAnimation.java:125)
at com.airbnb.lottie.animation.content.ShapeContent.getPath(ShapeContent.java:61)
at com.airbnb.lottie.animation.content.FillContent.draw(FillContent.java:88)
at com.airbnb.lottie.animation.content.ContentGroup.draw(ContentGroup.java:161)
at com.airbnb.lottie.animation.content.ContentGroup.draw(ContentGroup.java:161)
at com.airbnb.lottie.model.layer.ShapeLayer.drawLayer(ShapeLayer.java:30)
at com.airbnb.lottie.model.layer.BaseLayer.draw(BaseLayer.java:201)
at com.airbnb.lottie.model.layer.CompositionLayer.drawLayer(CompositionLayer.java:100)
at com.airbnb.lottie.model.layer.BaseLayer.draw(BaseLayer.java:201)
at com.airbnb.lottie.LottieDrawable.draw(LottieDrawable.java:319)
at android.widget.ImageView.onDraw(ImageView.java:1360)
java.lang.IllegalStateException: Missing values for keyframe.
at com.airbnb.lottie.animation.keyframe.FloatKeyframeAnimation.getValue(FloatKeyframeAnimation.java:16)
at com.airbnb.lottie.animation.keyframe.FloatKeyframeAnimation.getValue(FloatKeyframeAnimation.java:8)
at com.airbnb.lottie.animation.keyframe.BaseKeyframeAnimation.getValue(BaseKeyframeAnimation.java:125)
at com.airbnb.lottie.animation.keyframe.SplitDimensionPathKeyframeAnimation.setProgress(SplitDimensionPathKeyframeAnimation.java:28)
at com.airbnb.lottie.animation.keyframe.SplitDimensionPathKeyframeAnimation.<init>(SplitDimensionPathKeyframeAnimation.java:22)
at com.airbnb.lottie.model.animatable.AnimatableSplitDimensionPathValue.createAnimation(AnimatableSplitDimensionPathValue.java:21)
at com.airbnb.lottie.animation.keyframe.TransformKeyframeAnimation.<init>(TransformKeyframeAnimation.java:35)
at com.airbnb.lottie.model.animatable.AnimatableTransform.createAnimation(AnimatableTransform.java:78)
at com.airbnb.lottie.model.layer.BaseLayer.<init>(BaseLayer.java:102)
at com.airbnb.lottie.model.layer.ShapeLayer.<init>(ShapeLayer.java:21)
at com.airbnb.lottie.model.layer.BaseLayer.forModel(BaseLayer.java:45)
at com.airbnb.lottie.model.layer.CompositionLayer.<init>(CompositionLayer.java:52)
at com.airbnb.lottie.LottieDrawable.buildCompositionLayer(LottieDrawable.java:243)
at com.airbnb.lottie.LottieDrawable.setComposition(LottieDrawable.java:205)
at com.airbnb.lottie.LottieAnimationView.setComposition(LottieAnimationView.java:408)
at com.airbnb.lottie.LottieAnimationView$1.onResult(LottieAnimationView.java:62)
at com.airbnb.lottie.LottieAnimationView$1.onResult(LottieAnimationView.java:60)
at com.airbnb.lottie.LottieTask.notifySuccessListeners(LottieTask.java:153)
at com.airbnb.lottie.LottieTask.access$200(LottieTask.java:26)
at com.airbnb.lottie.LottieTask$1.run(LottieTask.java:140)
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.airbnb.lottie.model.content.ShapeData.isClosed()' on a null object reference
at com.airbnb.lottie.model.content.ShapeData.interpolateBetween(ShapeData.java:52)
at com.airbnb.lottie.animation.keyframe.ShapeKeyframeAnimation.getValue(ShapeKeyframeAnimation.java:23)
at com.airbnb.lottie.animation.keyframe.ShapeKeyframeAnimation.getValue(ShapeKeyframeAnimation.java:11)
at com.airbnb.lottie.animation.keyframe.BaseKeyframeAnimation.getValue(BaseKeyframeAnimation.java:125)
at com.airbnb.lottie.animation.content.ShapeContent.getPath(ShapeContent.java:61)
at com.airbnb.lottie.animation.content.BaseStrokeContent.getBounds(BaseStrokeContent.java:248)
at com.airbnb.lottie.animation.content.ContentGroup.getBounds(ContentGroup.java:175)
at com.airbnb.lottie.animation.content.ContentGroup.getBounds(ContentGroup.java:175)
at com.airbnb.lottie.model.layer.ShapeLayer.getBounds(ShapeLayer.java:35)
at com.airbnb.lottie.model.layer.BaseLayer.draw(BaseLayer.java:209)
at com.airbnb.lottie.model.layer.CompositionLayer.drawLayer(CompositionLayer.java:100)
at com.airbnb.lottie.model.layer.BaseLayer.draw(BaseLayer.java:201)
at com.airbnb.lottie.LottieDrawable.draw(LottieDrawable.java:319)
at android.widget.ImageView.onDraw(ImageView.java:1360)
at android.view.View.draw(View.java:20207)
@shizhongyu @grandstaish Have you upgraded to Lottie 3.0+ (3.0.6 is the latest)?
@shizhongyu Your animation renders fine for me.
@grandstaish The second one is https://github.com/airbnb/lottie-android/issues/1177 and the others might be related.
Updating lottie fixed the issues 馃檲Thanks @gpeal!
@shizhongyu I'm going to close this because upgrading will likely fix this for you too.
This sol'n doesn't work if I need to stay on version 2.6.1 for iOS purposes. Any fix without upgrading?
Most helpful comment
@shizhongyu @grandstaish Have you upgraded to Lottie 3.0+ (3.0.6 is the latest)?
@shizhongyu Your animation renders fine for me.
@grandstaish The second one is https://github.com/airbnb/lottie-android/issues/1177 and the others might be related.