【发布时间】:2020-03-03 20:52:17
【问题描述】:
我是 React Native 的新手。 我正在使用 Android Studio 中的 Android 模拟器,我根本没有更改任何 .json 文件中的任何内容......每当模拟器运行时,它总是一个空白屏幕......顺便说一下,它不会显示任何单个错误...... .
App.js:
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
class App extends React.Component {
render() {
return (
<View style={styles.container}>
<Text>Open up App.js to start working on your app!</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
export default App;
【问题讨论】:
-
模拟器工作了吗?你有整个黑屏吗?
标签: react-native