我再也不能通过命令行或Eclipse使用ADB连接到我的设备了。

执行命令

adb devices

返回设备名称,但显示为脱机状态。

我尝试过的事情。

切换Android调试模式 重新安装谷歌USB驱动 将操作系统恢复到以前工作的备份(CyanogenMod) 换掉USB数据线 多次重启电话/电脑 更新Android SDK

我真的不知道发生了什么。你觉得我还能试什么,我洗耳恭听。

需要明确的是,如果你遇到了同样的问题,那么问题可能是SDK过时了。从4.2.2开始,有一个安全特性需要您确认连接设备的RSA指纹。打开SDK管理器并更新工具!然后重新启动。


当前回答

当您使用Wi-Fi模式连接到设备时(例如,在Android Studio中或在控制台中运行adb tcpip 5555),似乎也经常发生这种情况。

修复:

断开USB连接——或者如果你是通过Wi-Fi连接的,关闭设备的Wi-Fi。 关闭Android Studio/Eclipse/其他IDE。 运行adb kill-server确保adb没有运行。 重新启动Android设备。 设备重新启动后,通过USB连接并运行adb设备。这将启动ADB守护进程。您的设备现在应该再次联机了。

其他回答

我尝试了dturvene和其他所有的解决方案,但它们都不起作用。我需要再走一步。

运行这些命令

亚行kill-server Android更新SDK—无ui 亚洲开发银行启动服务器

为了验证它是否有效,在命令之前和之后运行'adb version',并确保它是最新的。使用adb kill-server命令的原因是它很可能正在运行,并且在运行时不能更新,因此必须首先杀死它。

我惊讶地发现我的解决方案没有列在这里。

我有一台LG G3。手机必须使用LG的驱动程序连接。我去了

设备管理>卸载MTP驱动程序

adb立即在1秒内工作。

尝试关闭usb调试一次,然后再次启用它,然后将您的设备连接到system: link

对我来说最有效的是:

拆卸USB并重新插入。 在adb kill-server之后使用adb设备 有时,切换到计算机上不同的USB端口将解决问题。

This is a lame case, but just in case... I have a mac laptop with a power/usb hub but it only has a couple usb ports so I hung another powered usb hub off that. Seems/seemed to work fairly well, but for some reason my android device wouldn't keep a connection. Plug it in, it shows 'device', but try to do anything via adb and get an error and status goes "offline". Drove me crazy. Then I decided to try plugging in Android device straight to the first hub... worked immediately and solidly. I had been using the two hub setup for a while, but all of a suddden it just stopped working. Hope it helps somebody!