lottie-android: Missing values for keyframe
I’m exporting my animation using BodyMovin and I’m getting this error
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.TransformKeyframeAnimation.getMatrix(TransformKeyframeAnimation.java:113)
I also have problems when I try to click on “edit layer colors” it doesn’t show the animation, what I’m missing?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 26
- Comments: 29
@joancolmenerodev @hlk-trkn @meylinb @aadishgoel2013 that is correct. Lottie 3.0 and Bodymovin 5.5 has some significant json optimizations that will save upwards of 1/3 on the json size and parse speed. However, you must be on 3.0 or enable “export as old format” in bodymovin settings.
My json files works fine when i see it on preview in https://lottiefiles.com/preview but in android This Error keeps on coming
Process: com.example.lottietry, PID: 16998 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.TransformKeyframeAnimation.getMatrix(TransformKeyframeAnimation.java:113) at com.airbnb.lottie.model.layer.BaseLayer.draw(BaseLayer.java:199) 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:1367) at android.view.View.draw(View.java:19226) at android.view.View.buildDrawingCacheImpl(View.java:18474) at android.view.View.buildDrawingCache(View.java:18334) at android.view.View.draw(View.java:18946) at android.view.ViewGroup.drawChild(ViewGroup.java:4240) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4024) at android.view.View.updateDisplayListIfDirty(View.java:18167) at android.view.View.draw(View.java:18954) at android.view.ViewGroup.drawChild(ViewGroup.java:4240) at android.support.design.widget.CoordinatorLayout.drawChild(CoordinatorLayout.java:1246) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4024) at android.view.View.updateDisplayListIfDirty(View.java:18167) at android.view.View.draw(View.java:18954) at android.view.ViewGroup.drawChild(ViewGroup.java:4240) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4024) at android.view.View.updateDisplayListIfDirty(View.java:18167) at android.view.View.draw(View.java:18954) at android.view.ViewGroup.drawChild(ViewGroup.java:4240) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4024) at android.view.View.updateDisplayListIfDirty(View.java:18167) at android.view.View.draw(View.java:18954) at android.view.ViewGroup.drawChild(ViewGroup.java:4240) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4024) at android.view.View.updateDisplayListIfDirty(View.java:18167) at android.view.View.draw(View.java:18954) at android.view.ViewGroup.drawChild(ViewGroup.java:4240) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4024) at android.view.View.updateDisplayListIfDirty(View.java:18167) at android.view.View.draw(View.java:18954) at android.view.ViewGroup.drawChild(ViewGroup.java:4240) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4024) at android.view.View.draw(View.java:19229) at com.android.internal.policy.DecorView.draw(DecorView.java:791) at android.view.View.updateDisplayListIfDirty(View.java:18176) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:685) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:691) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:799) at android.view.ViewRootImpl.draw(ViewRootImpl.java:3056) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2851) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2404) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1437) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6886) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1029) at android.view.Choreographer.doCallbacks(Choreographer.java:841) at android.view.Choreographer.doFrame(Choreographer.java:772) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1015) at android.os.Handler.handleCallback(Handler.java:794) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:6651) at java.lang.reflect.Method.invoke(Native Method) 2019-04-10 11:13:35.094 16998-16998/com.example.lottietry E/AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:824)
I can confirm I fixed this issue by updating Lottie to
3.0.7
. Was experiencing the issue with an older version (2.8.0
). Just changing the dependency did work for me3.0.3-support. it saves my life HAPPY 2020
thanks thanks a lot for the 3.0.3-support. it saves my life
@amine03061990 you should upgrade to androidx for a host of other reasons but there is a one time 3.0.3-support release.
Hi @joancolmenerodev. I have also same issue today but then I founded this post and solve the problem.Now my animations working on android project. https://github.com/airbnb/lottie-web/issues/1561 In sum, bodymovin plugin has updated 5.5 recently so some animations have keyframe value issues. While exporting json from Ae you should have to change advanced export settings to old versions. Or you could update your player package. I choose first way and now everything is ok.
@LcsGrz That is lottie-react-native. You’ll have to file an issue there.
@Lohins it’s on maven.
I tried to upgrade Lotte library to 3.0.0 , but I think that i should migrate to AndroidX. Is there another solution without upgrading Lottie library ?