I keep getting the Can\'t bind to local XXXX for debugger
message in console, but not for 1 port, for all random ports. I have done what\'s stated in this question,
If you got the error like "Can't bind to local 8700 for debugger" in android studio then just close the emulator and then open the emulator again, this time you mustn't seen the error, this happens to me
In my case, this problem was caused by AVG antivirus. I tried adding exceptions and shutting it down only for development but that didn't work. I uninstalled it and the problem was solved after a restart.
I had same problem and none of given solutions worked. Then I have uninstalled all JRE 7 and installed latest JRE 6 (http://www.oracle.com/technetwork/java/javase/downloads/jre6downloads-1902815.html). It have immediately fixed the problem.
For Mac: Check your /etc/hosts file. Ensure that there is no any local ip for localhost. I added and forgot that i added a local ip (ex: 192.168.2.1) for localhost.
C:\WINDOWS\system32\drivers\etc\host
And should contain this line :
127.0.0.1 localhost
If you have ipv6 ip address ::1 in your host file you need to delete or remark it.
This might not be so constructive but I would recommend installing Linux. :-)
On the more serious side: Install VMWare or VirtualBox and run it in from a virtual machine with e.g. Ubuntu as OS. You can easily map your USB drive to the virtual machine.