![](/img/trans.png)
[英]npx react-native run-android doesn't start emulator and doesn't run if emulator is running
[英]Error in running npx react-native CLI in Android emulator
在 Android 模拟器中运行 npx react-native CLI 时出错
命令: npx react-native run-android
error: BUILD FAILED in 3s
at makeError (D:\TestProject\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
at D:\TestProject\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (D:\TestProject\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (D:\TestProject\node_modules\@react-native-community\cli\build\index.js:192:9) info
Run CLI with --verbose flag for more details.
您可能安装了全局 react-native-cli,这会导致 react-native 二进制文件中的名称冲突。 您能否通过运行 yarn global remove react-native-cli 来删除全局 react-native-cli。
请检查此链接有关 react-native-community https://github.com/react-native-community/cli/issues/838
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.