CameronStuartSmith / flutter_lottie

Use lottie in flutter for both iOS and Android
Apache License 2.0
158 stars 75 forks source link

App crash while animating, Missing values for keyframe #13

Open Durdonaa opened 5 years ago

Durdonaa commented 5 years ago

The app is crushing with the exception of "Missing values for keyframe" Using the last version of the plugin (0.2.0) App is migrated to AndroidX

Full output:

E/AndroidRuntime(19998): FATAL EXCEPTION: main E/AndroidRuntime(19998): Process: com.example.tasnet, PID: 19998 E/AndroidRuntime(19998): java.lang.IllegalStateException: Missing values for keyframe. E/AndroidRuntime(19998): at com.airbnb.lottie.animation.keyframe.IntegerKeyframeAnimation.getValue(IntegerKeyframeAnimation.java:16) E/AndroidRuntime(19998): at com.airbnb.lottie.animation.keyframe.IntegerKeyframeAnimation.getValue(IntegerKeyframeAnimation.java:8) E/AndroidRuntime(19998): at com.airbnb.lottie.animation.keyframe.BaseKeyframeAnimation.getValue(BaseKeyframeAnimation.java:125) E/AndroidRuntime(19998): at com.airbnb.lottie.model.layer.BaseLayer.draw(BaseLayer.java:197) E/AndroidRuntime(19998): at com.airbnb.lottie.model.layer.CompositionLayer.drawLayer(CompositionLayer.java:100) E/AndroidRuntime(19998): at com.airbnb.lottie.model.layer.BaseLayer.draw(BaseLayer.java:201) E/AndroidRuntime(19998): at com.airbnb.lottie.LottieDrawable.draw(LottieDrawable.java:319) E/AndroidRuntime(19998): at android.widget.ImageView.onDraw(ImageView.java:1270) E/AndroidRuntime(19998): at android.view.View.draw(View.java:17469) E/AndroidRuntime(19998): at android.view.View.buildDrawingCacheImpl(View.java:16764) E/AndroidRuntime(19998): at android.view.View.buildDrawingCache(View.java:16625) E/AndroidRuntime(19998): at android.view.View.draw(View.java:17231) E/AndroidRuntime(19998): at android.view.ViewGroup.drawChild(ViewGroup.java:3921) E/AndroidRuntime(19998): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3711) E/AndroidRuntime(19998): at android.view.View.updateDisplayListIfDirty(View.java:16459) E/AndroidRuntime(19998): at android.view.View.draw(View.java:17238)

Flutter Doctor Summary: Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, v1.7.8+hotfix.4, on Microsoft Windows [Version 10.0.18362.239], locale en-US)

[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3) [√] Android Studio (version 3.3) [√] VS Code, 64-bit edition (version 1.36.1) [√] Connected device (1 available)

• No issues found!

agent306 commented 5 years ago

This is why: https://github.com/airbnb/lottie-android/issues/1177

This plugin is using an old version of the player.

ParsaGachkar commented 5 years ago

Using Old version JSON didn't fixed the issue either? Can anyone confirm which version of bodymovin works?

ParsaGachkar commented 5 years ago

@CameronStuartSmith Can you confirm which version of bodymovin was used for generating example Animations?

DanialV commented 5 years ago

Please update lottie version to > 3.0 to fix this issue

cannonlee commented 4 years ago

may i know where to update the lottie version in flutter? can't seem to find it

RenatFakhrutdinov commented 4 years ago

I updated lottie version in flutter_lottie/android/build.gradle so as temporary solution you can use my repository and add to your pubspec.yaml next lines:

dependencies:
  flutter_lottie:
    git:
      url: https://github.com/RenatFakhrutdinov/flutter_lottie.git
MrHazee commented 4 years ago

I updated lottie version in flutter_lottie/android/build.gradle so as temporary solution you can use my repository and add to your pubspec.yaml next lines:

dependencies:
  flutter_lottie:
    git:
      url: https://github.com/RenatFakhrutdinov/flutter_lottie.git

Hi, Thanks for the temporary solution. How can I solve the problem permanent? Thanks

RenatFakhrutdinov commented 4 years ago

@MrHazee Hi! This lib isn't updated for a long time. Try to use https://pub.dev/packages/lottie