eclipse 启动错误:无法连接到远程虚拟机
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7203759/
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
Launch error: Failed to connect to remote VM
提问by Paul Goodwin
Possible Duplicate:
Eclipse Error: “Failed to connect to remote VM”
I am using Eclipse to dip my toe into Android development. All going well but recently, I am not able to use debug anymore. When I click 'Debug As' - 'Android Application', app builds ok, installs ok but Android device (either actual device or emulator, it makes no difference) waits with 'Waiting For Debugger' with a single 'Force Close' button. In the console, I get something like:-
我正在使用 Eclipse 涉足 Android 开发。一切顺利,但最近,我无法再使用调试了。当我单击“调试为”-“Android 应用程序”时,应用程序构建正常,安装正常,但 Android 设备(实际设备或模拟器,它没有区别)等待“等待调试器”和一个“强制关闭”按钮。在控制台中,我得到类似的信息:-
[2011-08-26 11:59:59 - Sunrise] Starting activity com.sr.sunrise.Sunrise on device 3833CB14F52C00EC [2011-08-26 11:59:59 - Sunrise] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.sr.sunrise/.Sunrise } [2011-08-26 12:00:00 - Sunrise] Attempting to connect debugger to 'com.sr.sunrise' on port 8614 [2011-08-26 12:00:00 - Sunrise] Launch error: Failed to connect to remote VM
[2011-08-26 11:59:59 - Sunrise] 在设备 3833CB14F52C00EC 上启动活动 com.sr.sunrise.Sunrise [2011-08-26 11:59:59 - Sunrise] ActivityManager:开始:Intent { act=android. intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.sr.sunrise/.Sunrise } [2011-08-26 12:00:00 - Sunrise] 尝试将调试器连接到 'com.sr .sunrise' 端口 8614 [2011-08-26 12:00:00 - Sunrise] 启动错误:无法连接到远程 VM
I have followed many searches (including this one StackOverflow.com linkand this StackOverflow.com link2
我遵循了许多搜索(包括这个 StackOverflow.com 链接和这个 StackOverflow.com link2
and I have tried many suggestions but nothing has fixed this problem yet.
我已经尝试了很多建议,但还没有解决这个问题。
Can anyone help me as this is now stopping me from creating my masterpiece ;-)
任何人都可以帮助我,因为这现在阻止我创作我的杰作;-)
回答by eightx2
This just worked for me:
这对我有用:
- Close Eclipse.
- Remove USB.
- Go to task manager, and delete all 'eclipse.exe' (in my case I had 4-5 instances).
- Also delete 'adb.exe'.
- Restart Eclipse.
- Reconnect USB.
- 关闭日食。
- 移除 USB。
- 转到任务管理器,并删除所有“eclipse.exe”(在我的情况下,我有 4-5 个实例)。
- 同时删除“adb.exe”。
- 重新启动 Eclipse。
- 重新连接 USB。
Maybe this will work for others who have the same problem.
也许这对有同样问题的其他人有用。
回答by Bob Kuhar
THIS IS PRETTY MUCH THE NUCLEAR OPTION...
这几乎是核选项......
I had the same problem on my macbookpro, I don't know exactly how to fix it data loss, but on my system, I "rm -r ~/.android", recreated my devices, and I can again debug.
我在我的 macbookpro 上遇到了同样的问题,我不知道如何修复它的数据丢失,但是在我的系统上,我“rm -r ~/.android”,重新创建了我的设备,我可以再次调试。
It is important to note that this is destructive in that the .android directory is where the android emulator is saving the state of the devices I am emulating.
需要注意的是,这是破坏性的,因为 .android 目录是 android 模拟器保存我正在模拟的设备状态的地方。
I think the root cause of the problem had something to do with an old android SDK that I removed from my system when I downloaded the android-sdk_r15-macosx.zip leaving some cruft around in the .android directory.
我认为问题的根本原因与我在下载 android-sdk_r15-macosx.zip 时从系统中删除的旧 android SDK 有关,在 .android 目录中留下了一些杂物。