【问题标题】:React Native blank screen with no errors?反应本机黑屏没有错误?
【发布时间】: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


【解决方案1】:

只需按 R 两次...很简单,是的...

【讨论】:

    猜你喜欢
    • 2023-01-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多