How to fix the error “Unable to open debugger port

2020-03-01 03:46发布

Error running Android Debugger (8600):
    Unable to open debugger port (localhost:8600):
    java.net.SocketException "Connection reset"

9条回答
一夜七次
2楼-- · 2020-03-01 03:54

If none of solutions didn't workded, just restart your computer.

查看更多
不美不萌又怎样
3楼-- · 2020-03-01 03:56

It could be that you need to wait for your code to stop compiling before you attached the debugger. I had a similar error and all I needed was patience.

查看更多
我命由我不由天
4楼-- · 2020-03-01 03:57

I tried other answers (e.g. restarting Android Studio) but they didn't solve this for me.

I had accidentally selected MTP (Media Transfer Protocol) in my Developer Options/USB Configuration. It started working once I set it to PTP (Picture Transfer Protocol).

EDIT: On reflection it's probably just that I changed the protocol because I've had the same issue since while on PTP. Hence I'm suggesting that the real answer is to change the protocol on the phone and, if you might need it, don't forget to change it back.

查看更多
等我变得足够好
5楼-- · 2020-03-01 04:00

In my case, there was another service running on my laptop(Windows) that was using the port 8600. I opened Task Manager and stopped the service. Now, I could debug my application normally without the above error.

查看更多
地球回转人心会变
6楼-- · 2020-03-01 04:01

I was able to fix this with these commands:

  • adb kill-server
  • adb start-server
查看更多
仙女界的扛把子
7楼-- · 2020-03-01 04:05

Try Restarting ANDROID STUDIO (Worked for me)

查看更多
登录 后发表回答