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

执行命令

adb devices

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

我尝试过的事情。

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

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

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


当前回答

对我来说,是USB线没有一直插到插槽里。不过我的Nexus 5可以充电。

其他回答

禁用防病毒,重新连接usb并检查adb.exe是否没有移动到quartine。

有时这可能发生,因为adb服务器错误(我认为)。它总是说

"device-name is offline" from adb devices command.

只需关闭服务器并重新开始。这对我很管用。

"adb kill-server"
"adb start-server"

对我来说很管用:一开始很管用,但过了一段时间就下线了。 我做了以下事情: 亚行kill-server 亚洲开发银行启动服务器。 再次用usb连接电脑 亚洲开发银行设备, 提供的空列表的输出。 Adb tcpip 5555, Adb connect <移动wifi IP地址> 然后它又上线了。

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!

只需关闭服务器adb kill-server