Yairopro
Yairopro

Reputation: 10360

React-Native - Image not showing in Android emulator

Why the image doesn't render on Android emulator?

I have only 2 files:

Index.js

import { AppRegistry } from 'react-native';
import App from './src/App';

AppRegistry.registerComponent('FirstApp', () => App);

App.js

    import React, { Component } from 'react';
    import {View, Image, Text} from 'react-native';

    export default class App extends Component<{}> {
        render() {
            return (
                <View>
                    <Image source={{uri: "https://upload.wikimedia.org/wikipedia/commons/d/de/Bananavarieties.jpg"}}
                           style={{width: 193, height: 110}}/>
                    <Text>Some text here..</Text>
                </View>
            );
        }
    }

Android emulator:

enter image description here

Android device:

enter image description here

Upvotes: 5

Views: 2394

Answers (1)

Yairopro
Yairopro

Reputation: 10360

My emulator just didn't have network..

Upvotes: 4

Related Questions