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

执行命令

adb devices

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

我尝试过的事情。

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

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

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


当前回答

我认为最好的方法是先禁用设备,然后从设备管理器中启用设备,然后运行adb devices命令。

转到开始选项卡,右键单击计算机 从下拉菜单中,单击Manage 在计算机管理界面中,单击“设备管理器” 在右侧窗格中,展开便携式设备以找到您的设备 右键单击设备名称,然后在下拉菜单中单击“禁用” 当它被禁用时,除了启用它外,请重复步骤5。

设备将重新上线。这是更快。

其他回答

在更新SDK工具后,请确保从您的platform-tools文件夹中使用adb。

在我意识到我使用的是复制在/usr/bin中的过时ADB版本后,我终于让它工作了。

我在Mac上解决的问题是将adb更新到最新版本(1.0.32)。现在我又可以看到我的设备在线了

我也遇到过这个问题。我更新了Android SDK管理器中的所有内容,使用设备管理器卸载了我的设备,现在它可以正常工作了。一路上我发出了一些“kill-server”和“start-server”。

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!

在尝试了两次之后,我将手机软件回滚到一个稳定的版本,它终于工作了。我在运行Cyanogen nightlies。无论如何,在这个帖子中发布的东西应该可以帮助遇到这个问题的任何人。