我跑了npx react-native运行android,但出现错误

问题描述 投票:0回答:1

在3m 0s内失败

错误无法安装应用程序。确保已设置Android开发环境:https://reactnative.dev/docs/environment-setup。使用--verbose标志运行CLI以获取更多详细信息。错误:命令失败:gradlew.bat app:installDebug -PreactNativeDevServerPort = 8081注意:C:\ Users \ Olivia \ Desktop \ App1 \ android \ app \ src \ debug \ java \ com \ app1 \ ReactNativeFlipper.java使用或覆盖已弃用的API。注意:有关详细信息,请使用-Xlint:deprecation重新编译。

FAILURE:构建因异常而失败。

  • 出了什么问题:任务':app:installDebug'的执行失败。

    com.android.builder.testing.api.DeviceException:com.android.ddmlib.AdbCommandRejectedException:已关闭

  • 尝试:使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获取更多日志输出。使用--scan运行以获取完整的见解。

  • https://help.gradle.org获取更多帮助

在3m 0s内失败

at makeError (C:\Users\Olivia\Desktop\App1\node_modules\execa\index.js:174:9)
at C:\Users\Olivia\Desktop\App1\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async runOnAllDevices (C:\Users\Olivia\Desktop\App1\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:5)
at async Command.handleAction (C:\Users\Olivia\Desktop\App1\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:186:9)
android react-native emulation
1个回答
0
投票

我建议您使用Genymotion模拟器而不是Android Studio模拟器。

© www.soinside.com 2019 - 2024. All rights reserved.