1

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.source code

4
  • What are you seeing instead to the image? Do you see any errors? How does it look like in iOS? Commented Sep 12, 2019 at 5:34
  • Only card is coming. You can see the screenshot on http://develop.fifokart.in/Screen%20Shot%202019-09-12%20at%2011.42.29%20AM.png Commented Sep 12, 2019 at 6:15
  • Did you try to put the image in a separate view, not inside a card? Commented Sep 12, 2019 at 6:17
  • @MohammedAlawneh Yes i have tried. Commented Sep 12, 2019 at 6:39

2 Answers 2

2

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>
 );
  }
}
Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.