[英]React-Native - Image not showing in Android emulator
Why the image doesn't render on Android emulator?为什么图像无法在 Android 模拟器上呈现?
I have only 2 files:我只有 2 个文件:
Index.js索引.js
import { AppRegistry } from 'react-native';
import App from './src/App';
AppRegistry.registerComponent('FirstApp', () => App);
App.js应用程序.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: Android 模拟器:
Android device: Android 设备:
我的模拟器只是没有网络..
我发现这个视频对于在 Mac 机器的 android 模拟器中打开互联网很有用https://youtu.be/OfGjE8njmC0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.