Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 29622

React-native : Why bundled image doesn't show if no network?

$
0
0

I have images I set up with require() in the constructor in the state.

this.state = {
  image: require('./static/image/noimage.png'),
}

I print this image in render() like this :

<Image source={this.state.image} style={{ width: 120, height: 80 }} />

Then I build an APK with :

EXPO_DEBUG=false expo build:android -t apk

The APK works perfectly in the android emulator and on a real phone, but images only show if network is enabled (WiFi or mobile connection). There is no error message,there is only reserved white space in place of the images.

I need this app to be able to work with no connection at all.

Where am I wrong ?


Viewing all articles
Browse latest Browse all 29622

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>