Reputation: 512
Image tag of react-native is working but image is not showing in the android emulator. Only the card is coming. Screenshot of source code is attached below.
Upvotes: 1
Views: 989
Reputation: 3636
Check 2 things May be it solve issue
1 : Internet permission is added in android/app/src/main/AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
2 : Is internet working on simulator? Try to check in browser of simulator.
Upvotes: 0
Reputation:
Try this, I hope it will help you
import React, { Component } from 'react';
import { Text, View, StyleSheet , Image} from 'react-native';
import { Constants } from 'expo';
export default class App extends Component {
render() {
let Image_Http_URL ={ uri: 'https://reactnativecode.com/wp-content/uploads/2017/05/react_thumb_install.png'};
return (
<View style={{elevation:10, justifyContent: 'center', flex:1, margin:10}}>
<Image source={Image_Http_URL} style = {{height: 200, resizeMode : 'stretch', padding:5 }} />
</View>
);
}
}
Upvotes: 2