Android Studio wireless ADB error (10061)

2019-02-02 13:48发布

It seems that wireless ADB has more and more issues each time I update Android Studio. Using 2.1.1, I'm now unable to connect to my tablet using the command:

adb connect <ip addr>

It results in the error:

unable to connect to <ip addr>:5555: cannot connect to <ip addr>:5555: No connection could be made because the target machine actively refused it. (10061)

This happens directly after approving the connection in the dialog box on the tablet. Before today I was forced to do an adb kill-server prior to attempting to connect to the tablet but now that doesn't even help.

11条回答
我只想做你的唯一
2楼-- · 2019-02-02 14:44

I had the same issue. These steps worked for me:

  1. connect your device with usb
  2. when your cmd already in AppData\Local\Android\Sdk\platform-tools>,type adb tcpip 5555
  3. the cmd will show restarting in TCP mode port: 5555
  4. type adb connect 192.168.43.1:5555

Hope this can solve your issue.

查看更多
Melony?
3楼-- · 2019-02-02 14:46

I had a similar problem. I found out the problem was if I had other devices/emulators connected to the adb already, the "adb connect <ip_addr>" command would give me the "No connection could be made because the target machine actively refused it" message.

The solution is to make sure all the other devices/emulators are disconnected (either physically disconnect or quit the emulator application) before running adb connect <ip_addr>. You can then reconnect your other devices (if you need them reconnected). A total pain.

Your mileage to this solution may vary depending on your problem.

查看更多
ら.Afraid
4楼-- · 2019-02-02 14:48

Recently i face this problem. Because your device and PC connected different Network.

查看更多
乱世女痞
5楼-- · 2019-02-02 14:48

Unfortunately this issue can be caused by different reasons. One of the reasons - make sure previous communication is disconnected.

USE:
1. adb kill-server
2. Issue command adb disconnect after restarting adb server. Do same thing after finishing job
3. run adb remount
4. adb tcpip 50555 (I usually use higher port number)
5. unplug USB cable
6. adb connect device_ip:50555

when done run adb disconnect

查看更多
兄弟一词,经得起流年.
6楼-- · 2019-02-02 14:48

Usually the 'target machine actively refused it' message is displayed when the target machine's 'ADB debugging' feature is not turned ON. It is turned off by default in almost all devices unless we enable 'developer options'. So whenever you land on this error, make sure you go to the settings of your target machine and trickle to the developer/development area and somewhere there should be a place to enable ADB.

查看更多
登录 后发表回答