【问题标题】:Adb invocation failed when trying to get android logs尝试获取 android 日志时,adb 调用失败
【发布时间】:2018-03-11 15:09:58
【问题描述】:

我正在尝试访问我的 React Native 应用程序的日志。

为此,我正在跑步:

react-native log-android

但是,我遇到了这个问题:

error: more than one device/emulator
adb invocation failed. Do you have adb in your PATH?
(node:24464) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): undefined
(node:24464) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

adb 肯定在我的路径中,所以这不是问题。 我只打开了一个 Android 模拟器。

知道还有什么可能导致这种情况吗?

【问题讨论】:

    标签: android macos react-native


    【解决方案1】:

    尝试运行adb devices。不止一个吗?如果是这样,请关闭您已连接的额外设备。有时,您连接的手机将被视为设备。你还想拥有一个export PATH=$PATH:{YOURANDROIDTOOLS}(类似于 /Users/{USER}/Library/Android/sdk/tools 或 /Users/{USER}/Applications/Genymotion.app 如果您使用的是 genymotion)在您的 zshrc 或配置文件中

    【讨论】:

      猜你喜欢
      • 2021-07-26
      • 2016-08-02
      • 1970-01-01
      • 1970-01-01
      • 2021-11-07
      • 1970-01-01
      • 2017-05-19
      • 2020-02-07
      • 1970-01-01
      相关资源
      最近更新 更多