如何安装回到Android模拟器亚行? [英] How to attach back the Android emulator to ADB?

查看:192
本文介绍了如何安装回到Android模拟器亚行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我在Eclipse中击中调试启动模拟器,一定时间后,从亚行断开,但仿真器保持打开状态。这是有求必应,我可以浏览和启动应用程序。

After I start the emulator by hitting Debug in Eclipse, after certain time it disconnects from the ADB, but the emulator stays open. It is responsive, I can navigate and start apps.

我怎样才能附上回模拟器亚行,要能够从Eclipse的调试?

How can I attach back the emulator to ADB, to be able to debug from Eclipse?

(目前的解决办法是终止仿真器,关闭Eclipse和重新启动它们,这需要10分钟,你也知道的模拟器需要时间来启动)

(the current workaround is the terminate the emulator, close Eclipse and restart both of them, which takes 10 minutes as you know the emulator needs time to start up)

修改1
看看这个图片:

EDIT 1
Check out this image:

编辑2

在我杀了,然后重新启动服务器。一个仿真过程显示了在Eclipse设备选项卡。但是,这不能扩展,而且我没有看到子流程。
我不能打调试已经,因为它说:调试已在运行。 (如何我停止调试?)

After I kill and restart server. One emulator process shows up in Devices tab in Eclipse. But that cannot be expanded, and I don't see sub-processes.
I can't hit debug already, as it says: Debug already running. (How to I stop the debug?)

如果我设法开始另一项目的调试,它挂在仿真器中告诉我:等待调试器附加。什么也没有发生。

If I managed to start the debugging of another project, It hangs out in the emulator telling me: Waiting for the debugger to attach. Nothing happens.

推荐答案

正如你所说的,这个问题是不是蚀失去联系的仿真器,但亚行 - 中的Android调试桥 - 失去与它接触。由于Eclipse使用亚行与模拟器进行通信时,亚行坏了Eclipse可以什么都不做。

As you said, the problem is not Eclipse losing contact with the Emulator, but ADB - the Android Debug Bridge - losing contact with it. As Eclipse uses ADB to communicate with the emulator when ADB is broken Eclipse can do nothing.

要解决这个问题运行停止ADB服务器以下命令:

To fix this stop the ADB server by running the following command:

adb kill-server

然后Eclipse会通常会尝试重​​新启动亚行,或者您也可以通过运行ADB命令重新启动它自己,如:

Eclipse will then usually try to restart ADB, or you can restart it yourself by running an ADB command, such as:

adb devices

如果你这样做,你会看到这样的输出:

If you do, you'll see output like this:

* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
emulator-5554   device

您还可以通过鼠标做到这一点,使用重置亚行设备视图在Eclipse中选择。

You can also do this via the mouse, using the Reset adb option in the Devices view in Eclipse.

替代文字

另外值得一提的控制台查看有两种模式, DDMS 安卓 。您可以在控制台是平时模式,但它的 DDMS 模式下,它会显示亚行的状态信息。通过点击按钮,用监控器图标,或者使用旁边的箭头,它选择的模式:

It's also worth noting the Console view has two modes, DDMS and Android. You're usually in Console mode but it's DDMS mode which will show ADB status messages. Select modes by clicking the button with the Monitor icon, or using the arrow next to it:

替代文字

如果一切都失败,请尝试从OS杀亚行的过程。在Windows XP中使用:

If all else fails, try killing the adb processes from the OS. On Windows XP I use:

TASKKILL /F /IM adb.exe

这篇关于如何安装回到Android模拟器亚行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆