question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[lottie-react-native] Lottie crash on Android

See original GitHub issue

🐛 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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

11reactions
prajwolrgcommented, Jul 26, 2020

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

5reactions
Cookizzacommented, Jul 30, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Android] Lottie crash at start · Issue #542 · lottie-react-native ...
I am facing the same issue.App installs fine but crashes when trying to render LottieView. Versions : "lottie-ios": "^3.0.3", ...
Read more >
React native expo app crashes on android when using lottie ...
The Expo cli doesn't allow to run the app with the latest version of lottie. It restricts me to version 2.6.1 which is...
Read more >
Lottie wrapper for React Native. - JitPack
Lottie component for React Native (iOS, Android, and Windows). Lottie is an ecosystem of libraries for parsing Adobe After Effects animations exported as ......
Read more >
React Native Lottie Component for Android and iOS
React Native Lottie is a library for Android and iOS that parses Adobe After Effects animations exported as JSON and renders them natively....
Read more >
Lottie for React Native, iOS, and Android - Morioh
Lottie component for React Native (iOS and Android) Lottie is a mobile library for ... If your app crashes on Android, means auto...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found