Android 模拟器启动但 Eclipse 无法识别它
一般来说,一切都工作正常,但有时 Eclipse 或我的 Android 模拟器会变得很混蛋并拒绝工作。
我在 Eclipse 中打开 AVD 管理器。我选择所需的 AVD,然后单击“开始”。模拟器启动并经历漫长的引导过程。它终于完成启动,然后由于某种原因,它立即重新启动并再次经历漫长的启动过程。一旦第二次启动,Eclipse 就会失去对它的跟踪。它不再列在“设备”选项卡中,我无法安装我的应用程序或在该模拟器上运行它。如果我终止模拟器并尝试重新启动它,那么我会得到完全相同的行为。这太令人沮丧了。
控制台中没有出现任何消息来解释该行为。知道为什么会发生这种情况吗?
As a general rule, everything works fine, but then sometimes either Eclipse or my Android emulator decides to be a jerk and refuses to work.
I open the AVD Manager in Eclipse. I choose which AVD I want and click Start. The emulator starts up and it goes through the loooong process of booting. It finally finishes booting and then for some reason, it immediately reboots and goes through the looong process of booting again. Once it boots the second time, Eclipse loses track of it. It is no longer lists in the Devices tab and I can't install my app or run it on that emulator. If I kill the emulator and try to start it over, then I get the exact same behavior. It's incredibly frustrating.
There are no messages happening in the console to explain the behavior. Any idea why this is happening?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
在 Eclipse 中,选择 Window->Show View->Devices。
如果您在新打开的窗口中看不到模拟器,请选择同一窗口中的向下箭头图标窗口(最小化和最大化按钮附近),然后从下拉菜单中选择“重置 ADB”。
另一种方法是打开 CMD.exe 并键入以下两个命令(根据需要更改 ADB 目录) :
While in Eclipse, choose Window->Show View->Devices.
If you can't see the emulator on the newly opened window choose the down-arrow icon in the same window (near the minimize and maximize buttons) and from the dropdown menu select "Reset ADB".
The alternative is to open CMD.exe and type the following two commands (change the ADB directory as necessary):
我也见过这个。如果您终止并重新启动 adb 服务器,Eclipse 应该会看到它。
I've seen this too. If you kill and restart the adb server, Eclipse should then see it.
在 mac os x / eclipse 中尝试了这些命令 - 有效,但它也会杀死实际设备,您必须拔出/重新插入它们才能恢复它们。
tried these commands in mac os x / eclipse - works, but it also kills the actual devices and you have to unplug/plug them back in to get them back.
当 adb 在模拟器之前启动时,这是一个已知问题。我不知道真正的原因,但一个快速的解决方法是在命令提示符下重新启动 adb(模拟器正在运行)。
现在,
将返回模拟器,Eclipse 将能够安装该应用程序。
That's a known issue when adb starts before the emulator. I don't know the real reason, but a quick workaround is to restart adb in the command prompt (with the emulator running)
Now,
will return the emulator and Eclipse will be able to install the app.