gpt4 book ai didi

javascript - React Native,无法启动模拟器。原因 : No emulators found as an output

转载 作者:行者123 更新时间:2023-12-03 18:32:05 24 4
gpt4 key购买 nike

我正在尝试使用命令 react-native run-android 在模拟器中运行我的 react native 应用程序但它抛出了那个错误

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 44s
info Connecting to the development server...
warn Failed to connect to development server using "adb reverse": spawnSync /Opt/Android/platform-tools/adb ENOENT
info Starting the app...
The system cannot find the path specified.
error Failed to start the app. Run CLI with --verbose flag for more details.
Error: Command failed: /Opt/Android/platform-tools/adb shell am start -n com.reactproject/com.reactproject.MainActivity
at makeError (C:\Users\Danger World\ReactProject\node_modules\execa\index.js:174:9)
我已经设置了我的 android studio 和 sdk 管理器,avd 管理器就像它在文档中显示的那样,我也已经设置了路径,但它仍然显示该错误,有人知道为什么吗?有人可以帮忙吗?

最佳答案

您可以使用以下命令修复它:

react-native doctor
此命令显示所有需要修复的问题。
enter image description here
按 f 修复问题,不要忘记重新启动 Windows
然后在运行项目之前打开模拟器。
打开模拟器后,
运行命令:
react-native run-android
固定后:
enter image description here
如果那行得通,别忘了给我一个赞成票。

关于javascript - React Native,无法启动模拟器。原因 : No emulators found as an output,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64459285/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com