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 · 29 comments
Closed

Missing values for keyframe #1177

joancolmenerodev opened this issue Apr 9, 2019 · 29 comments

Comments

@joancolmenerodev
Copy link

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?

@aadishgoel
Copy link

aadishgoel 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
Copy link

meylinb 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
Copy link

hlk-trkn 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
Copy link
Collaborator

gpeal 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
Copy link

VINNUSAURUS commented Apr 28, 2019

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

@gpeal
Copy link
Collaborator

gpeal commented Apr 29, 2019

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

@VINNUSAURUS
Copy link

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

@dpmaycry
Copy link

@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
Copy link

just update? someone had examples? :(

@amine03061990
Copy link

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
Copy link
Collaborator

gpeal 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
Copy link

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

@Lohins
Copy link

Lohins commented Aug 28, 2019

thanks thanks a lot for the 3.0.3-support. it saves my life
@gpeal @androidfans Hi, do you know where I can find the 3.0.3-support.? I can't see it on the list.

@gpeal
Copy link
Collaborator

gpeal commented Aug 29, 2019

@Lohins it's on maven.

@jdnichollsc
Copy link

How can I fix this issue from Expo?

@voghDev
Copy link

voghDev commented Sep 25, 2019

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 me

@985211yyg
Copy link

@gpeal Lottie 2.8.0 and above only supports projects that have been migrated to androidx. For more information, read Google's migration guide. so, are you kidding me ? goodbye..

@gpeal
Copy link
Collaborator

gpeal commented Oct 29, 2019

@985211yygg There was a one-time 3.0.3-support published.

@MehrAmoon
Copy link

migrate to '3.0.3-support' version fix my issue too . thanks

@LcsGrz
Copy link

LcsGrz commented Dec 5, 2019

Hi @MehrAmoon, how to install 3.0.3-support?

imagen

@gpeal
Copy link
Collaborator

gpeal commented Dec 5, 2019

@LcsGrz That is lottie-react-native. You'll have to file an issue there.

@LcsGrz
Copy link

LcsGrz commented Dec 5, 2019

@gpeal You're right. My mistake :(

@tangchao0106
Copy link

3.0.3-support. it saves my life
HAPPY 2020

@Shahadat3031
Copy link

Please update your library to solve this problem.
This worked for me.

Thanks

@mmcrvarma
Copy link

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

Hi, Can you tell me how to create 3.4.0-support release, since i need to support some fixes in latest lottie without migrating to AndroidX

@ozanurkn
Copy link

ozanurkn commented Jul 7, 2020

3.4.0-support saved my year in my life

@aliabdorrahimi
Copy link

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.

Thank you it i am update package and solve it thank you very good

@MilosSimic
Copy link

3.0.3-support worked for me.

@adityakadlag2004
Copy link

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?

Just Update the version to 4.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests