为什么图片无法在Android模拟器上呈现?
我只有两个文件:
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模拟器:
Android设备:
答案 0 :(得分:3)
我的模拟器刚刚没有网络..