Android Eclipse DDMS 错误“无法为调试器绑定到本地 8600”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3318738/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse DDMS error "Can't bind to local 8600 for debugger"
提问by Rads
I get the following error in Eclipse:
我在 Eclipse 中收到以下错误:
[timestamp - ddms] Can't bind to local 8600 for debugger
Why?
为什么?
回答by Doguhan Uluca
In addition to adding "127.0.0.1 localhost" to your hosts file, make the following changes in Eclipse.
除了将“127.0.0.1 localhost”添加到您的主机文件之外,还要在 Eclipse 中进行以下更改。
Under Window -> Preferences -> Android -> DDMS:
在窗口 -> 首选项 -> Android -> DDMS 下:
- Set Base local debugger port to "8601"
- Check the box that says "Use ADBHOST" and the value should be "127.0.0.1"
- 将 Base 本地调试器端口设置为“8601”
- 选中“使用 ADBHOST”框,值应为“127.0.0.1”
Thanks to Ben Clayton in the comments for leading me to a solution.
感谢 Ben Clayton 在评论中引导我找到解决方案。
Some Google keywords: Ailment or solution for Nexus S Android debugging with the error message: Can't bind to local 8600 for debugger.
一些 Google 关键字: Nexus S Android 调试的问题或解决方案,并显示错误消息:无法绑定到本地 8600 以进行调试。
回答by IgorGanapolsky
Try killing port 8600 with this command:
尝试使用以下命令终止端口 8600:
fuser -k 8600/tcp
That fixed it for me.
那为我修好了。
回答by Sephy
Don't uninstall, this is just a dumb thing done by the system which as trouble finding localhost it seems. Take a look in here, it's quite easy to fix. I had the same issue a few weeks ago and solved it this way.
不要卸载,这只是系统所做的一件愚蠢的事情,看起来很难找到 localhost。看看这里,很容易修复。几周前我遇到了同样的问题,并以这种方式解决了它。
the window Host file that is messed up:
the file is at this place :
C:\WINDOWS\system32\drivers\etcAnd should contain this line : 127.0.0.1 localhost
乱码的window Host文件:
文件在这个地方:
C:\WINDOWS\system32\drivers\etc并且应该包含这一行:127.0.0.1 localhost
回答by blganesh101
I had the following hosts file
我有以下主机文件
127.0.0.1 localhost
192.168.1.2 localhost
127.0.0.1 localhost
192.168.1.2 localhost
and i started getting the error continously and it was very annoying
我开始不断收到错误,这很烦人
“Can't bind to local 8600 for debugger”
“Can't bind to local 8601 for debugger”
“Can't bind to local 8602 for debugger” and so on
“调试器不能绑定本地8600”
“调试器不能绑定本地8601”
“调试器不能绑定本地8602”等等
I deleted the second line from the hosts file
192.168.1.2 localhost
and everything is back to normal.
我从主机文件中删除了第二行
192.168.1.2 localhost
,一切恢复正常。
Hope this helps.
希望这可以帮助。
回答by Anil Chahal
In addition to adding 127.0.0.1 localhostto your hosts file, make the following changes in Eclipse.
除了将127.0.0.1 localhost添加到您的主机文件之外,还要在 Eclipse 中进行以下更改。
Under
在下面
Window -> Preferences -> Android -> DDMS
窗口 -> 首选项 -> Android -> DDMS
Set Base local debugger port to 8601
将 Base 本地调试器端口设置为8601
Check the box that says Use ADBHOSTand the value should be 127.0.0.1Thanks to Ben Clayton & Doguhan Uluca in the comments for leading me to a solution.
选中使用ADBHOST的框,该值应为127.0.0.1感谢 Ben Clayton 和 Doguhan Uluca 在评论中引导我找到解决方案。
Some Google keywords:
一些谷歌关键词:
Ailment or solution for Nexus S Android debugging with the error message: Can't bind to local 8600 for debugger.
出现错误消息的 Nexus S Android 调试问题或解决方案:Can't bind to local 8600 for debugger。
回答by Kyle Clegg
For people running Android Studio
and Eclipse
:
对于跑步Android Studio
和Eclipse
:
I know that answers are already saturated, but I'll just add that it appears that this error surfaces after installing Android Studio and returning to Eclipse to build and run your project.
我知道答案已经饱和,但我只想补充一点,在安装 Android Studio 并返回到 Eclipse 以构建和运行您的项目后,此错误似乎出现了。
Make sure you close all other instances of ADB that may be running (including Android Studio). Once you've done this if you are still having troubles try killing all ADB server processes and restarting. If you haven't setup a global variable, open terminal and navigate to the platform-tools folder of the Android SDK Eclipse is referencing, then run:
确保关闭所有其他可能正在运行的 ADB 实例(包括 Android Studio)。完成此操作后,如果仍有问题,请尝试终止所有 ADB 服务器进程并重新启动。如果您尚未设置全局变量,请打开终端并导航到 Eclipse 所引用的 Android SDK 的 platform-tools 文件夹,然后运行:
./adb kill-server
./adb start-server
回答by Cruinh
I had a similar problem on OSX. It just so happens I had opened two instances of Eclipse so I could refer to some code in another workspace. Eventually I realized the two instances might be interfering with each other so I closed one. After that, I'm no longer seeing the "Can't bind..." error.
我在 OSX 上遇到了类似的问题。碰巧我打开了两个 Eclipse 实例,所以我可以参考另一个工作区中的一些代码。最终我意识到这两个实例可能会相互干扰,所以我关闭了一个。之后,我不再看到“无法绑定...”错误。
回答by Peter
I'm running the Android ADT bundle on Windows 8. Both solutions described in this topic (editing the host file and changing the eclipse preferences) did not solve the problem.
我在 Windows 8 上运行 Android ADT 包。本主题中描述的两种解决方案(编辑主机文件和更改 eclipse 首选项)都没有解决问题。
In my situation the problem has been solved by a de-installation of Java 7 (now using Java 6). The debugger is now working again!
在我的情况下,问题已通过卸载 Java 7(现在使用 Java 6)解决。调试器现在又可以工作了!
回答by Joshua. O
Running two instances of adb (eg eclipse debugger and android studio) at same time causes conflicts as this too
同时运行两个 adb 实例(例如 eclipse debugger 和 android studio)也会导致冲突
回答by Brian
For me, this was due to the fact that I was trying to debug using eclipse yet also running Android Studio. Both programs were trying to monitor android devices on the similar ports. Either quit all IDEs other than one, or modify the port number used for debugging in the IDE preferences so they are not similar.
对我来说,这是因为我尝试使用 eclipse 进行调试,但同时也在运行 Android Studio。这两个程序都试图监视类似端口上的 android 设备。要么退出除一个之外的所有 IDE,要么在 IDE 首选项中修改用于调试的端口号,使它们不相似。