Android 我是否应该担心 DDMS 控制台日志消息“无法绑定到本地 nnnn 以进行调试”?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2937532/
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
Should I worry about DDMS console log messages "Can't bind to local nnnn for debugger"?
提问by Chris
I'm new to Android programming (and Eclipse IDE and Android emulator). I've got Hello World and some of Notepad working, but I'm still constantly getting quite a few DDMS console log messages (shown below) about not being able to bind locals for debugger.
我是 Android 编程的新手(以及 Eclipse IDE 和 Android 模拟器)。我有 Hello World 和一些记事本工作,但我仍然不断收到很多关于无法为调试器绑定本地人的 DDMS 控制台日志消息(如下所示)。
[2010-05-29 21:03:16 - ddms] Can't bind to local 8601 for debugger
[2010-05-29 21:05:26 - Device] Failed to delete temporary package: device (emulator-5556) request rejected: device not found
[2010-05-29 21:06:47 - ddms] Can't bind to local 8600 for debugger
[2010-05-29 21:07:05 - ddms] Can't bind to local 8601 for debugger
[2010-05-29 21:07:05 - ddms] Can't bind to local 8602 for debugger
And so on. Is this a problem? Can I get rid of these messages somehow?
等等。这是一个问题吗?我可以以某种方式摆脱这些消息吗?
回答by Andro Selva
In Eclipse, goto
在 Eclipse 中,转到
1) Windows->Preference
1) Windows->首选项
2) Expand Androidmenu in the side of the Preference Window.
2) 展开首选项窗口侧面的Android菜单。
3) Now select DDMS from it.
3)现在从中选择DDMS。
4) Then Set the Base local debugger port to "8601" and enable "Use ADBHOST" checkbox and the ABDHOST value should be "127.0.0.1".
4)然后将Base本地调试器端口设置为“8601”并启用“Use ADBHOST”复选框,ABDHOST值应为“127.0.0.1”。
5) Click apply and ok.
5)单击应用并确定。
6) Now you have to restart your ADB, for this you have to login as root user(Assuming linux user) and navigate to Platfrom tools folder of your Android SDK. Then execute,
6) 现在您必须重新启动 ADB,为此您必须以 root 用户身份(假设为 linux 用户)登录并导航到您的 Android SDK 的 Platfrom 工具文件夹。然后执行,
./adb kill-server
./adb start-server
You will be able to see the message "Daemon started Successfully" . If not repeat step 6 once again until you see the success message.
您将能够看到消息“守护进程已成功启动”。如果没有再次重复步骤 6,直到您看到成功消息。
回答by Mattijle
You can get rid of the the messages by adding following to your hosts file:
您可以通过将以下内容添加到您的主机文件来摆脱这些消息:
127.0.0.1 localhost
ps. hosts file can be found from c:\windows\system32\drivers\etc\hosts or if you are on linux /etc/hosts
附:hosts 文件可以从 c:\windows\system32\drivers\etc\hosts 找到,或者如果你使用的是 linux /etc/hosts
回答by BlueMan
In my situation the problem has been solved by a uninstalling all Java 7. The debugger is now working again!
在我的情况下,问题已通过卸载所有 Java 7 解决。调试器现在又可以工作了!