Unable to open debugger port : java.net.ConnectException "Connection refused"

My problem Solved by below steps:

1. Invalidate Caches/Restart Android studio

2. Restart you Emulator.

Done for me.


Restarted my Android Studio, worked for me.


Your debug port is probably busy (in use by another process). You can kill all the process associated with the ADB debug port (8601 or higher) using this:

fuser -k 8601/tcp 

UPDATE:

Under OSX, lsof should do the job in substitution of fuser:

lsof -i :8601

I have also met this problem. and I think the my solution may help others, so I post it here.

First, you should know what will cause "connection refused" problem. Usually there are two possible reasons:

  1. This particular server is not started.
  2. The server is started but not accept any connection.

As for your problem, I suggest you to first start your Android Device Monitor(DDMS) from your android studio, and DO NOT CLOSE IT.

Then in the DDMS, you can select the package you want to debug and "Update Threads", and now you can debug this application in your studio.