我的 ReactNative 应用程序在 Iphone 模拟器上运行良好,但是当我尝试通过 USB 在我的 android 移动设备上运行它时,它向我抛出了这个错误。
> Task :app:installDebug
Installing APK 'app-debug.apk' on 'SM-N770F - 10' for app:debug
Installed on 1 device.
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 2m 17s
227 actionable tasks: 227 executed
info Connecting to the development server...
warn Failed to connect to development server using "adb reverse": spawnSync adb ENOENT
info Starting the app...
error Failed to start the app. Run CLI with --verbose flag for more details.
我有环境变量设置并且工作正常。在终端中,我的 adb 设备已成功列出。提前致谢。编辑:该应用程序已安装在设备中,但在安装时没有打开,而且它没有反映我正在做的更改。我可以看到模拟器上的变化