安卓:问题与日食模拟器调试 [英] Android: Problems debugging with the emulator from eclipse

查看:263
本文介绍了安卓:问题与日食模拟器调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是推动我疯了。像这些人一样,<一个href=\"http://stackoverflow.com/questions/1554099/slow-android-emulator/2049798#2049798\">slow-android-emulator,我发现从运行Eclipse中的模拟器是缓慢的,有问题的。至于建议,我已经试过单独运行仿真器。但我没有得到我的最新变化。我不知道偏食那么好,但我想类似'建设,然后将最新的图像以某种方式加载到仿真器。

This is driving me crazy. Like these people, slow-android-emulator, I'm finding running the emulator from eclipse is slow and problematic. As suggested, I've tried running the emulator seperately. But then I don't get my latest changes. I don't know eclipse that well, but I would like something like 'build' and then somehow load the latest image into the emulator.

另外,我已经试过保持模拟器开放和不断使用运行 - >调试,但经过2〜3次,我得到像下面这样的错误:

Also, I've tried keeping the emulator open and the continually use run->debug, but after 2 or 3 times, I get errors like the following:

Failed to install HelloAndroid.apk on device 'emulator-5554': timeout
Launch canceled!


emulator: ERROR: the user data image is used by another emulator. aborting


Waiting for HOME ('android.process.acore') to be launched...
emulator-5554 disconnected! Cancelling 'com.example.helloandroid.HelloAndroid activity launch'!

java.lang.NullPointerException
at com.android.ddmlib.Client.sendAndConsume(Client.java:571)
at com.android.ddmlib.HandleHello.sendHELO(HandleHello.java:142)
at com.android.ddmlib.HandleHello.sendHelloCommands(HandleHello.java:65)
at com.android.ddmlib.Client.getJdwpPacket(Client.java:670)
at com.android.ddmlib.MonitorThread.processClientActivity(MonitorThread.java:317)
at com.android.ddmlib.MonitorThread.run(MonitorThread.java:263)

我试图杀死并重新启动服务器,亚行不果。

I've tried killing and restarting the adb server to no avail.

再一次,简单地说,我只想一个系统在那里我可以有效地进行更改,它们加载到仿真和测试。

Once again, briefly, I would just like a 'system' where I can effectively make changes, load them into the emulator and test.

推荐答案

模拟器通常是缓慢的,但一旦开始,通常我从来没有重新启动。

The emulator is usually slow, but once started usually I never had to restart.

如果你觉得在Eclipse之外运行的仿真器速度更快,那么你可以在外面日食,并在Android应用程序运行模拟器运行 - >配置,你可以选择preferred AVD,并取消自动目标模式。 (此外,它告诉我,你的Eclipse可能没有足够的内存,您需要更改vmargs如果您已经分配的内存很少。后来更多)。

If you feel that running emulator from outside eclipse is faster, then you can run the emulator outside eclipse and in the android application Run --> Configuration, you can choose "preferred avd" and uncheck automatic target mode. (Also it tells me that your eclipse probably does not have enough memory. You need to change vmargs if you have allocated very little memory. More on that later).

此外,当你想要做一些code修改后,再次进行调试,你关闭调试会话(在调试窗口中的红色按钮),并开始一个新的。模拟器不处理热插拔那么好。

Also when you want to debug again after making some code change, are you closing the debugging session (The red button in your debug window) and starting a new one. The emulator does not handle hot swapping all that well.

(注:请尝试使用JConsole或其他一些探查并粘贴内存使用情况,或至少检查在任务管理器中的内存使用情况)

(Note: Please try using Jconsole or some other profiler and paste the memory usage or at least check memory usage in task manager.)

这篇关于安卓:问题与日食模拟器调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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