简体   繁体   English

无法通过TCP / IP连接Android ADB

[英]Unable to connect Android ADB over TCP/IP

I'm trying to get the Android Debug Bridge working over wifi from my 64-bit Windows 7 desktop computer to my Nexus10. 我正在尝试通过我的64位Windows 7桌面计算机将wifi调试桥工作到我的Nexus10。 I connect the device over USB, and then I followed " How can I connect to Android with ADB over TCP? , but I end up with an error message that it can't connect: 我通过USB连接设备,然后我按照“ 我如何使用ADB通过TCP连接到Android?” ,但我最终得到一条无法连接的错误消息:

C:\adt-bundle\sdk\platform-tools>adb usb
restarting in USB mode

C:\adt-bundle\sdk\platform-tools>adb devices -l
List of devices attached
R32D300NXJV            device product:mantaray model:Nexus_10 device:manta


C:\adt-bundle\sdk\platform-tools>adb tcpip 5555
restarting in TCP mode port: 5555

C:\adt-bundle\sdk\platform-tools>adb connect 192.168.231.2
unable to connect to 192.168.231.2:5555

To start debugging this, I tried pinging the Nexus10 from my desktop computer. 为了开始调试,我尝试从台式计算机上ping Nexus10。 Both devices are connected to the same router, by a cable in the case of the desktop computer, and wirelessly for the Nexus10. 两台设备通过台式计算机连接到同一路由器,通过电缆连接,Nexus10无线连接。 However, I got 但是,我得到了

C:\adt-bundle\sdk\platform-tools>ping 192.168.231.2

Pinging 192.168.231.2 with 32 bytes of data:
Reply from 192.168.231.61: Destination host unreachable.
Reply from 192.168.231.61: Destination host unreachable.
Reply from 192.168.231.61: Destination host unreachable.
Reply from 192.168.231.61: Destination host unreachable.

Ping statistics for 192.168.231.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

The IP address 192.168.231.61 which returns "Destination host unreachable" is the IP address of my desktop computer. 返回“目标主机无法访问”的IP地址192.168.231.61是我的台式计算机的IP地址。 Although the ping doesn't work, I don't know whether the fact that I can't ping is the source of my ADB problem or whether it's unconnected to the issue. 虽然ping不起作用,但我不知道我不能ping的事实是否是我的ADB问题的根源,或者它是否与该问题无关。

I'm running Android Debug Bridge version 1.0.31. 我正在运行Android Debug Bridge版本1.0.31。 Can anyone help? 有人可以帮忙吗?

This must have been a networking problem, because when I connected via a wireless network on a different subnet, then (1) I was able to ping the nexus10 from my desktop, and (2) ADB connected over TCPIP OK. 这一定是网络问题,因为当我通过不同子网上的无线网络连接时,(1)我能够从我的桌面ping nexus10,(2)通过TCPIP连接ADB OK。 So my conclusion is that my desktop/router/nexus10 had some bizarre routing incompatibility when on the same subnet, when disappeared when they were on different subnets. 所以我的结论是,我的桌面/路由器/ nexus10在同一个子网上有一些奇怪的路由不兼容,当它们在不同的子网上时消失了。

Thanks anyway. 不管怎么说,还是要谢谢你。

I have problems both with my nexus 4 and my nexus 10 on the same wifi as my laptop. 我的nexus 4和我的nexus 10在与我的笔记本电脑相同的wifi上都有问题。 The nexus 4 I have had more time to experiment with, and what helps is either rebooting the phone, or using "DNS Hostname Changer" to restart networking and then I can connect again. nexus 4我有更多的时间来试验,有什么帮助是重新启动手机,或使用“DNS主机名更改器”重新启动网络,然后我可以再次连接。

The Nexus 10 seems to be a bit worse than Nexus 4 though.... Nexus 10似乎比Nexus 4差一点......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM