即使连接了,也无法看到我的Android HTC

时间:2015-02-22 14:40:43

标签: android eclipse debugging adt

我有一台HTC,我把它插在运行Yosemite的Mac上。我可以在手机中看到“USB tethering”。但是,我无法在Eclipse的“设备”视图中看到它。

我试图重新启动adb,但是我失败了。我在控制台中看到了这一点:

[2015-02-22 15:35:57 - DeviceMonitor] Adb connection Error:EOF
[2015-02-22 15:35:57 - ddms] '/Users/Jim/android-sdk-macosx/platform-tools/adb,start-server' failed -- run manually if necessary
[2015-02-22 15:35:57 - DeviceMonitor] Connection attempts: 1
[2015-02-22 15:35:58 - DeviceMonitor] Connection attempts: 2
[2015-02-22 15:35:59 - DeviceMonitor] Connection attempts: 3
[2015-02-22 15:36:00 - DeviceMonitor] Connection attempts: 4
[2015-02-22 15:36:01 - DeviceMonitor] Connection attempts: 5
[2015-02-22 15:36:02 - DeviceMonitor] Connection attempts: 6
[2015-02-22 15:36:03 - DeviceMonitor] Connection attempts: 7
[2015-02-22 15:36:04 - DeviceMonitor] Connection attempts: 8
[2015-02-22 15:36:05 - DeviceMonitor] Connection attempts: 9
[2015-02-22 15:36:06 - DeviceMonitor] Connection attempts: 10
[2015-02-22 15:36:07 - DeviceMonitor] Connection attempts: 11
[2015-02-22 15:36:22 - DeviceMonitor] Adb connection Error:EOF
[2015-02-22 15:36:22 - DeviceMonitor] Connection attempts: 1
[2015-02-22 15:38:09 - DeviceMonitor] Adb connection Error:EOF
[2015-02-22 15:38:09 - DeviceMonitor] Connection attempts: 1

如何在设备中看到我的手机,以便我可以运行应用程序?

1 个答案:

答案 0 :(得分:1)

首先,您应确保已启用USB调试。在Settings→Developer Options中,选中“USB debugging”选项。

要在“设置”菜单中显示开发人员选项,请转到“设置”→“关于”,然后多次单击内部版本号(在HTC上,您将在“软件信息”→“更多”中找到它。

然后,如果这不能解决问题,您应该尝试重新启动adb。这通常可以解决问题。为此,请打开终端并执行以下命令:

adb kill-server
adb start-server

您可以通过运行以下方式验证adb是否识别您的设备:

adb devices

如果一切正常,您应该在结果列表中看到您的HTC设备。

如果不这样做,则应仔细检查udev规则文件,以确保正确设置HTC设备的规则。