Dar*_*nce 4 javascript android react-native
我正在尝试使用命令在模拟器中运行我的 React Native 应用程序,react-native run-android但它抛出了该错误
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)
Run Code Online (Sandbox Code Playgroud)
我已经设置了我的 android studio 和 sdk 管理器,avd 管理器就像它在文档中显示的一样,我已经设置了路径,但它仍然显示该错误,有人知道为什么吗?有人可以帮忙吗?
sop*_*hin 10
您可以使用以下命令修复它:
react-native doctor
Run Code Online (Sandbox Code Playgroud)
此命令显示需要修复的所有问题。
按 f 解决问题,不要忘记重新启动 Windows
然后在运行您的项目之前打开模拟器。模拟器打开后,运行命令:react-native run-android
修复后:
如果那行得通,别忘了给我点赞。
| 归档时间: |
|
| 查看次数: |
14699 次 |
| 最近记录: |