【发布时间】:2021-07-20 22:39:47
【问题描述】:
当我运行 react-native run-android 来运行我的 React Native 应用程序时,我收到此错误,然后构建失败:
'C:\Users\Alex\AppData\Local\Android\Sdk/platform-tools/adb' is not recognized as an internal or external command,
operable program or batch file.
error Failed to launch emulator. Reason: Emulator exited before boot..
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
无论我是使用通过 USB 连接的手机运行命令,还是使用从 Android Studio 打开的模拟器运行命令,我都会收到此错误。但是,当我运行adb devices 时,模拟器和我的设备都会出现。
我很确定这不是 React Native 代码的问题,因为我尝试运行多个不同的应用程序并得到相同的错误。
有谁知道可能是什么问题以及为什么没有检测到设备和模拟器?
【问题讨论】:
-
能否请您发布
react-native info的输出
标签: android react-native react-native-android