【问题标题】:Failed to connect to development server using "adb reverse": spawnSync adb ENOENT无法使用“adb reverse”连接到开发服务器:spawnSync adb ENOENT
【发布时间】:2021-01-21 03:57:58
【问题描述】:

我的 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 设备已成功列出。提前致谢。 编辑:该应用程序已安装在设备中,但在安装时没有打开,而且它没有反映我正在做的更改。我可以看到模拟器上的变化

【问题讨论】:

  • 它是节点 Metro 捆绑器。在其他系统上正常没有任何问题,调试apk运行良好。

标签: android react-native gradle adb enoent


【解决方案1】:

所以当我尝试创建一个 apk 并测试应用程序时,它在 apk 构建成功后向我显示了多个错误。就我而言,是这些: “Cannot fit requested classes in a single dex file” AsyncStorage is null iOS

所以应用解决方案后,apk 生成成功,当我尝试通过 USB 运行应用程序时,它工作正常。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-10-03
    • 1970-01-01
    • 2021-06-05
    • 2016-03-18
    • 1970-01-01
    • 2017-12-27
    • 2016-02-01
    • 2011-04-24
    相关资源
    最近更新 更多