【问题标题】:React Native Could not create ADB Bridge ErrorReact Native 无法创建 ADB 桥错误
【发布时间】:2017-09-04 10:26:25
【问题描述】:

JS 服务器已经在运行。
在设备上构建和安装应用程序 (cd android && gradlew.bat installDebug)...
下载https://jcenter.bintray.com/com/facebook/react/react-native/0.20.1/react-native-0.20.1.pom
....#这里有一堆下载
:app:assembleDebug :app:installDebug 05:13:20 E/adb: 无法获得“adb 版本”的结果 :app:installDebug 失败

FAILURE:构建失败并出现异常。

  • 出了什么问题: 任务 ':app:installDebug' 执行失败。

    com.android.builder.testing.api.DeviceException:无法创建 ADB Bridge。亚行位置:D:\Android\sdk\platform-tools\adb.exe

  • 尝试: 使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。

我正在使用 Windows 机器和 android studio,并按照教程完成了
https://facebook.github.io/react-native/docs/getting-started.html
我被困在这个问题上,因为我无法在命令提示符下运行“react-native run-android”

另外,运行 adb 版本会给出

Android 调试桥版本 1.0.32
修订版 eac51f2bb6a8-android

【问题讨论】:

标签: android-studio react-native adb


【解决方案1】:

我已经解决了这个问题..如果您使用的是模拟器,请关注React-Native, Android, Genymotion: ADB server didn't ACK...如果您通过 USB 使用您的设备进行开发,那么这是您的 adb 路径错误.. 将路径设置为 D: \Android\sdk\platform-tools...在电脑属性->高级设置->环境变量->系统变量..它对我有用。

【讨论】:

    【解决方案2】:

    我有另一种解决方案,如果您使用的是模拟器,请确保它在启动之前运行您的原生应用程序。有时您可能需要在运行 react native 应用程序之前关闭使用相同端口:8081(react native 应用程序默认使用)的应用程序(如 skype)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-03-18
      • 1970-01-01
      • 2018-08-26
      • 2019-12-29
      • 2020-03-06
      • 1970-01-01
      • 2017-12-27
      相关资源
      最近更新 更多