Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing values for keyframe #1177

Closed
joancolmenerodev opened this issue Apr 9, 2019 · 12 comments

Comments

@joancolmenerodev
Copy link

commented Apr 9, 2019

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?

@aadishgoel2013

This comment has been minimized.

Copy link

commented Apr 10, 2019

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)

@meylinb

This comment has been minimized.

Copy link

commented Apr 10, 2019

Same issue here, trying to figure out what is going on. Do you think it might be something with the update? (We still havent updated on Android to the latest lottie version since it requires Android X)

@hlk-trkn

This comment has been minimized.

Copy link

commented Apr 10, 2019

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.
airbnb/lottie-web#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.

@gpeal

This comment has been minimized.

Copy link
Collaborator

commented Apr 10, 2019

@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.

@vinnusaurus

This comment has been minimized.

Copy link

commented Apr 28, 2019

can someone convert this json to old format and post here ? https://lottiefiles.com/5737-lock-and-unlock

@gpeal

This comment has been minimized.

Copy link
Collaborator

commented Apr 29, 2019

@vinnusaurus I recommend that you upgrade Lottie instead. There is no tool to do the backwards conversion.

@vinnusaurus

This comment has been minimized.

Copy link

commented Apr 30, 2019

@vinnusaurus I recommend that you upgrade Lottie instead. There is no tool to do the backwards conversion.
i am using xamarin, no luck

@dpmaycry

This comment has been minimized.

Copy link

commented May 25, 2019

@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.

"export as old format" solved my problem due to androidx reason cannot upgrade to 3.0

@PolarNemo

This comment has been minimized.

Copy link

commented Jun 9, 2019

just update? someone had examples? :(

@amine03061990

This comment has been minimized.

Copy link

commented Jul 25, 2019

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 ?

@gpeal

This comment has been minimized.

Copy link
Collaborator

commented Aug 9, 2019

@amine03061990 you should upgrade to androidx for a host of other reasons but there is a one time 3.0.3-support release.

@androidfans

This comment has been minimized.

Copy link

commented Aug 19, 2019

thanks thanks a lot for the 3.0.3-support. it saves my life

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants
You can’t perform that action at this time.