android – Lottie Animation in react-native expo-ThrowExceptions

Exception or error:

I am trying first time to implement lottie animation with json file in my react native expo project but there is nothing appears:

I had also added "implementation": "com.airbnb.android:lottie:$lottieVersion", in dependencies for build grader but it didn’t worked.

Following is my render code :

    if(this.props.navigation.getParam('city')){
        this.getWeather()
    }
  return (
    <View style={styles.container}>
      <Header title="Current Weather" />
      <Card style={{margin: 20, backgroundColor:"#30336b" }} >
                <View style={{padding:20, alignItems:'center'}} >
            <Title style={styles.text1}>{this.state.info.name}</Title>
            <Image  style={{width:120, height:120}}
                source={{uri:'http://openweathermap.org/img/w/'+this.state.info.icon+".png"}}
             />
            <Title style={styles.text2} >TEMPERATURE : {this.state.info.temp} °C</Title>
            <Title style={styles.text2}>DESCRIPTION : {this.state.info.desc}</Title>
            <Title style={styles.text2}>HUMIDITY : {this.state.info.humidity}</Title>
        </View>
        <LottieView
        source={require('../lottie/16406-colorfull-loader(1).json')}
        autoPlay
        loop
      />
      </Card>

    </View>
  );
}```


How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *