Android 我的应用程序js在react native中不工作。我犯了什么错?

Android 我的应用程序js在react native中不工作。我犯了什么错?,android,react-native,Android,React Native,我是个新手。当我在app.js中学习hello world时。当我为android运行“native react run android”时,构建成功,但无法在手机上运行。不变 这是我在app.js中的代码 import React, {Component} from 'react'; import {Platform, StyleSheet, Text, View} from 'react-native'; const instructions = Platform.sel

我是个新手。当我在app.js中学习hello world时。当我为android运行“native react run android”时,构建成功,但无法在手机上运行。不变

这是我在app.js中的代码

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

    const instructions = Platform.select({
    ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
    android:
    'Double tap R on your keyboard to reload,\n' +
    'Shake or press menu button for dev menu',
    });

    type Props = {};
    export default class App extends Component<Props> {
render() {
    return (
            <View style={styles.container}>
    <Text style={styles.welcome}>Hello, Steven Wiaji, S.Kom</Text>
    <Text style={styles.instructions}>To get started, edit App.js</Text>
    <Text style={styles.instructions}>{instructions}</Text>
  </View>
);
}}

const styles = StyleSheet.create({
    container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
    },
    welcome: {
    fontSize: 20,
    textAlign: 'center',
    margin: 10,
    },
    instructions: {
    textAlign: 'center',
    color: '#333333',
    marginBottom: 5,
    },
    });
import React,{Component}来自'React';
从“react native”导入{平台、样式表、文本、视图};
const指令=Platform.select({
ios:'按Cmd+R重新加载,\n'+'Cmd+D或抖动开发菜单',
安卓:
'双击键盘上的R以重新加载,\n'+
'为开发菜单摇动或按下菜单按钮',
});
类型Props={};
导出默认类应用程序扩展组件{
render(){
返回(
你好,Steven Wiaji,S.Kom
要开始,请编辑App.js
{指令}
);
}}
const styles=StyleSheet.create({
容器:{
弹性:1,
为内容辩护:“中心”,
对齐项目:“居中”,
背景颜色:“#F5FCFF”,
},
欢迎:{
尺寸:20,
textAlign:'中心',
差额:10,
},
说明:{
textAlign:'中心',
颜色:'#333333',
marginBottom:5,
},
});
这是亚洲开发银行运行

这是我在手机上跑步的时候
代码没有问题。节点_模块可能存在问题。您可能想删除该文件夹并再次执行
npm i
warn
。 这里有一个有效的例子。

在运行android命令之前,您是否保存了上述文件中的更改?@angelos\u lex是。我确定要保存我的文件。我使用IDE atomis运行您的打包程序?@JaydeepGalani如何知道我的打包程序正在运行?当我卸载项目并再次运行时。是一样的。没有更改到要删除的文件夹?啊哈,我看到一个adb问题。你可能想看看