首页 > 解决方案 > 使用 react-native 执行 run-android 时出错

问题描述

我的英语不是那么好。我来自土耳其,如果你不清楚我的问题,我很抱歉。

当我run-android使用 React Native 运行时,我收到以下错误,但是当我运行时run-ios我没有遇到任何问题。我正在使用 Mac 电脑。

谢谢您的帮助。


info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1063 file(s) to forward-jetify. Using 4 workers...
info JS server already running.
info Installing the app...

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: spawn EPERM
    at ChildProcess.spawn (internal/child_process.js:407:11)
    at Object.spawn (child_process.js:548:9)
    at module.exports (/Users/meric/Desktop/Phonder/node_modules/execa/index.js:205:26)
    at runOnAllDevices (/Users/meric/Desktop/Phonder/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:32)
    at buildAndRun (/Users/meric/Desktop/Phonder/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:182:41)
    at /Users/meric/Desktop/Phonder/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:146:12
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Command.handleAction (/Users/meric/Desktop/Phonder/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js:186:9)

在此处输入图像描述

标签: react-native

解决方案


我认为您应该在任何模拟器或设备上卸载该应用程序,然后重新运行该应用程序。


推荐阅读