11

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, but with no luck. I'm running Windows 8. In fact, these problems started after the upgrade to Windows 8.

[2012-11-02 16:40:41 - ddms] Can't bind to local 8627 for debugger
[2012-11-02 16:40:41 - ddms] Can't bind to local 8617 for debugger
[2012-11-02 16:40:42 - ddms] Can't bind to local 8605 for debugger
[2012-11-02 16:40:42 - ddms] Can't bind to local 8610 for debugger
[2012-11-02 16:41:46 - ddms] Can't bind to local 8611 for debugger
[2012-11-02 16:41:46 - ddms] Can't bind to local 8611 for debugger
[2012-11-02 16:41:47 - ddms] Can't bind to local 8611 for debugger
[2012-11-02 16:42:36 - ddms] Can't bind to local 8611 for debugger
[2012-11-02 16:42:38 - ddms] Can't bind to local 8611 for debugger
[2012-11-02 16:42:39 - ddms] Can't bind to local 8622 for debugger
[2012-11-02 16:42:39 - ddms] Can't bind to local 8608 for debugger
[2012-11-02 16:42:39 - ddms] Can't bind to local 8608 for debugger
[2012-11-02 16:42:48 - ddms] Can't bind to local 8609 for debugger
[2012-11-02 16:42:48 - ddms] Can't bind to local 8609 for debugger
[2012-11-02 16:43:32 - ddms] Can't bind to local 8609 for debugger
[2012-11-02 16:43:36 - ddms] Can't bind to local 8625 for debugger
[2012-11-02 16:43:36 - ddms] Can't bind to local 8619 for debugger

What can I do?

Edit
I've tried a new install of the Android SDK, and a new Eclipse install. I've also tried to turn off my firewall.

Community
  • 1
  • 1
nhaarman
  • 98,571
  • 55
  • 246
  • 278

7 Answers7

5

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.

KreCi
  • 96
  • 1
  • 4
5

Open platform-tools in cmd and run these two commands

C:\Users\SH-PC-W8.1-3\AppData\Local\Android\Sdk\platform-tools

adb kill-server
adb start-server

This works perfectly.

Note: choose your platform-tools location

Akila
  • 715
  • 2
  • 8
  • 13
3

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.

MXS
  • 121
  • 6
1

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.

Nesim Razon
  • 9,684
  • 3
  • 36
  • 48
  • 3
    Done that as well, see http://stackoverflow.com/questions/3318738/i-get-error-in-ddmscant-bind-to-local-8600-for-debugger-why. – nhaarman Nov 04 '12 at 18:23
  • I am %70 sure that it will be from IPv6. Does anything exists on your host file about ipv6 like ::1. – Nesim Razon Nov 04 '12 at 18:30
  • The host file is completely empty (only the standard commented out documentation). The only uncommented line is the line you stated. – nhaarman Nov 04 '12 at 18:31
0

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.

Murat
  • 3,084
  • 37
  • 55
0

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

Sindhu
  • 1
-2

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.

Nicholas
  • 2,147
  • 3
  • 23
  • 31