问题描述
我的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设备已成功列出。提前致谢。 编辑:该应用程序已安装在设备中,但安装后无法打开,并且无法反映我所做的更改。我可以在模拟器上看到更改
解决方法
因此,当我尝试创建apk并测试应用程序时,在apk构建成功后,它向我显示了多个错误。以我为例: “Cannot fit requested classes in a single dex file” AsyncStorage is null iOS
因此,在应用解决方案之后,apk便成功生成了,当我尝试通过USB运行应用程序时,它运行良好。