几分钟后 ADB 断开连接

ADB disconnecting after a few minutes

升级到 Android Studio 2.2 后,adb 会在几分钟(约 15 分钟)后断开与我的设备的连接。我每次都必须重新插入设备或禁用 ADB 并重新启用。它发生在所有设备上。这是在 MacOS Sierra 上。他们是否添加了超时设置?

尝试重新安装驱动程序并重新启动 Mac,它适用于 AS 2.2

问题出在 ADB 上,错误跟踪器中报告了该问题:Issue 219085: adb does not work reliably on MacOS Sierra.

来自话题的回答:

The fix has been released in the Beta Preview Channel, we apologize for the inconvenience.or more information on how to use the Beta Preview Channel, please consult http://tools.android.com/download/studio

编辑-1:
将 2.2 升级到 2.2.1 或卸载 Android Studio-2.2 并安装 2.2.1 将不起作用。尝试按照线程 How to completely uninstall Android Studio? 进行彻底卸载并检查。

如果您不想将 Android studio 升级到预览版,只需打开 sdk 管理器并升级 sdk 构建工具,然后重新启动 android studio。这个对我有用 !

I ran into this error as well, and it turned out that the problem for me was that a Stetho tab was open in Chrome (i.e. a tab at URL chrome://inspect/#devices ), which I guess was causing the device to be in use. Closing that tab, then running adb kill-server, made adb devices work again.

原回答