My code does not gives any error when executed over expo (react-native) but the image is also not loading. The path I get from details of the image in android is "Internal storage/DCIM/images.jpeg" therefore searching over forums read a suggestion to replace Internal storage with "file:///storage/emulated/0/". But this too does not work. The only output I get is the Hello, world! text.My device is Huawei BG2-U01.
Hope I am not missing out on any basics.
import React, { Component } from 'react'; import { Text, View,Image } from 'react-native'; export default class HelloWorldApp extends Component { render() { return ( <View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}> <Text>Hello, world!</Text> <Image source={{uri:'file:///storage/emulated/0/DCIM/images.jpeg'}} style={{width: 60, height: 60}} /> </View> ); } }