![](/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.