React native Tterm&x27;反应自然';运行react native run android时无法识别
我需要帮助建立我的项目。我已尝试运行react native android,但出现以下错误:React native Tterm&x27;反应自然';运行react native run android时无法识别,react-native,react-native-android,React Native,React Native Android,我需要帮助建立我的项目。我已尝试运行react native android,但出现以下错误: react-native : The term 'react-native' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the p
react-native : The term 'react-native' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling
of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ react-native run android
+ ~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (react-native:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
伊亚伊开尔文
您需要节点、React本机命令行界面、JDK和Android Studio
我想你已经,
开发操作系统:Linux,目标操作系统:Android
节点
反应本机CLI
npm install -g react-native-cli
Java开发工具包
Android开发环境
看守员(可选)
创建新应用程序
$ react-native init AwesomeProject
$ cd AwesomeProject
$ react-native run-android
注:
如果出现如下错误:
“无法从真实设备上的“资产”索引.android.bundle加载脚本”
那么,
(如果未创建,则)将目录创建为android/app/src/main/assets
旧的本地版本低于<0.46
或
那么
运行此命令
npm install -g react-native-cli
之后,只需将npm路径添加到环境变量中的系统变量中
C:\Users\YOUR USERNAME\AppData\Roaming\npm
发布您正在使用的命令和源代码。非常感谢…这有助于“npm安装-g react native cli”。它安装了所有依赖项。我非常感谢你的支持。
$ react-native run-android
npm install -g react-native-cli
C:\Users\YOUR USERNAME\AppData\Roaming\npm