Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error on load image on React-native: Unexpected character

Tags:

I'm try display a image on a component on React-native, but I don't know why this error happens...

Example of code:

render () {     let { convenience } = this.props     return (       <View style={{flexDirection: 'row', height: 50}}>         <Text style={{marginRight: 30}}>{convenience.name}</Text>         <Image source={require('./icons___favorito_ativo.png')} />       </View>     ) } 

Printscreen:

enter image description here

like image 425
Fuechter Avatar asked Mar 27 '16 20:03

Fuechter


1 Answers

I too faced the same error. After a lot of trying, I restarted the packager, and the app picked up the image. So the solution is: Restart the packager.

Hope this helps.

like image 164
Akshar Patel Avatar answered Sep 29 '22 22:09

Akshar Patel