expo: Lottie (DangerZone) animations crashing only in android expo client app new update

Lottie animation is crashing only in android (I’m not using images for the animation), it did work before in andriod (before updating expo client) and also still (even after the update) working on ios. This happened after updating expo client apk… does anyone know how to fix this?

componentDidMount(){
        this.animation.play();
}

render(){
     return(
              <View style={{
                    top: 0,
                    width: Dimensions.get('screen').width,
                    height: Dimensions.get('screen').height,
                    position: 'absolute',
                    justifyContent: 'center',
                    alignItems: 'center',
                    opacity: 0.5
                }}>
                        <Lottie
                            resizeMode='cover'
                            style={{
                                width: '100%',
                                height: '50%',
                                justifyContent: 'center',
                                alignItems: 'center'
                            }}
                            ref={animation => {
                                this.animation = animation;
                            }}
                            source={require('../../Animations/background_anim/data.json')}
                        /> 
                </View>
          );
}

screenshot_2018-07-18-20-05-34-1

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (5 by maintainers)

Most upvoted comments

Alright, I have here a gist from my error:

https://gist.github.com/thegreatgabsby/c09b430e707862069d8a92f82d731647

And I figured it is probably a problem of the Animation itself. Plugged in the animation of the example and it worked. To give you a hint of what might be going on.

Hope this helps.

EDIT:

Exporting the animation to support old json format in the advanced settings made it work for me