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

执行命令

adb devices

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

我尝试过的事情。

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

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

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


当前回答

如果你之前已经授权了你的电脑的RSA指纹,并尝试了adb kill-server等,但没有运气,你的问题可能只是在它被锁定时试图连接它。试着按下屏幕上的按钮并输入你的图案-这为我修复了它。

其他回答

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

修复:

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

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

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

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

adb立即在1秒内工作。

尝试重新启动adb服务器,操作如下:

adb kill-server

adb start-server

我也遇到过和你一样的问题。重新启动adb服务器将解决此问题。

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!

重新启动设备。我尝试了这里列出的所有方法来让我的HTC手机(运行Android 4.0.3)工作,但adb设备一直显示它离线。重启后,手机终于上线了。这里的一些其他建议可能有助于手机被识别出来,但在试用过程中重新启动几次肯定不会有什么坏处。