expo: [lottie-react-native] Lottie crash on Android

🐛 Bug Report

Environment

  Expo CLI 3.18.6 environment info:
    System:
      OS: macOS 10.15.4
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 10.19.0 - ~/.nvm/versions/node/v10.19.0/bin/node
      Yarn: 1.22.4 - /usr/local/bin/yarn
      npm: 6.14.4 - ~/.nvm/versions/node/v10.19.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    IDEs:
      Android Studio: 3.6 AI-192.7142.36.36.6241897
      Xcode: 11.4.1/11E503a - /usr/bin/xcodebuild
    npmGlobalPackages:

      expo-cli: 3.18.6

Steps to Reproduce

This bug is not present on iOS. So, you have to run an Android Virtual Device (AVD) on Android 10. Here is a screenshot of my device : https://prnt.sc/s5rhpl

Then, you can try to run an application which uses lottie-react-native library.

Don’t forget to add this to your code :

<LottieView
          ref={animation => {
            this.animation = animation;
          }}
          style={{
            width: 400,
            height: 400,
          }}
          source={require('./assets/anim.json')}
        />

Expected Behavior

The application is not crashing…

Actual Behavior

Expo application is crashing with no error message, it can’t run the code.

Reproducible Demo

I created a repo that you can clone and run here : https://github.com/maxgfr/expo-lottie

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

Indeed, after exporting in V2 files, the android application doesn’t crash.

Nevertheless, it could be interesting to understand why lottie v3 is crashing on android only… Like this, we could fix the bug :p

Thanks for your message @byCedric and @mashuk999 !

Is there any way to export V3 files to V2 files when .JSON files has been downloaded from lottiefiles.com

I am wondering the same about converting animations - I have json files already and am wondering how to convert them

Can we reopen this issue? @maxgfr

The issue is common for importing Lottie v3 files. Try to downgrade to v2 that will resolve the issue.

Hi @maxgfr! Thanks for the issue report. And thanks to @mashuk999, for the quick reply 😄 Unfortunately, we can’t upgrade (yet) to lottie v3. That’s why you have to export your assets for older lottie versions. Does this work for you?

Hope it helps!