React native expo app crashes on android when using lottie-react-native (2.6.1), but works on ios

Viewed 2118

I've been stuck on this problem for about 3 days, tried almost everything. What I learn't through this process is that AndroidX support in lottie-react-native came after version 3. 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 why my app crashes on expo android client, while it works for ios.

Is there anyway I could get through this problem without migrating to react-native-cli?

1 Answers

You should try converting your lottie JSON to old version. I gave 2 reference link below how to do it. I tried and it worked. I haven't checked yet and i don't know which version of cli that you use, but if you use earlier version of cli, you can check latest version. Maybe it allows you to use latest version of lottie-react-native.

Ref1: https://github.com/react-native-community/lottie-react-native/issues/478#issuecomment-493946863

Ref2: https://github.com/expo/expo/issues/4835#issuecomment-508932818

Related