Android 模拟器问题

发布于 2024-08-11 03:41:02 字数 332 浏览 5 评论 0原文

当我启动模拟器时,我遇到很多问题(错误):-

HttpConnectionApp]emulator-5554 disconnected!
Cancelling 'net.paxcel.http.HttpConnectionApp activity launch'!

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

每次我都必须重新运行它,但都是徒劳。

我该如何改进这一点,以便我可以在同一个 AVD 上重新运行应用程序?

When I launch the emulator I face many problems (Errors):-

HttpConnectionApp]emulator-5554 disconnected!
Cancelling 'net.paxcel.http.HttpConnectionApp activity launch'!

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

Each time I have to re-run it but all in vain.

How can I improve this so that I can re-run the application on same AVD?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(13

黯然#的苍凉 2024-08-18 03:41:02

我的计算机锁定后也遇到了同样的问题,我必须重新启动它。

擦除用户数据并没有解决我的问题,我必须手动删除以下文件夹

C:\Users\%UserName%\.android\avd\AVD2.1.avd\cache.img.lock
C:\Users\%UserName%\.android\avd\AVD2.1.avd\userdata-qemu.img.lock

I had the same issue after my computer locked up and I had to power cycle it.

Wiping the user data didn't fix my problem, I had to delete the following folders manually

C:\Users\%UserName%\.android\avd\AVD2.1.avd\cache.img.lock
C:\Users\%UserName%\.android\avd\AVD2.1.avd\userdata-qemu.img.lock
枕花眠 2024-08-18 03:41:02

显然有效的快速修复方法是每次发生此错误时重新启动 adb 服务器:

adb kill-server && adb start-server

然后,您只需再次运行应用程序(无需重新启动 AVD)即可。

A quick-fix that obviously works is to restart the adb server each time this error occurs:

adb kill-server && adb start-server

Then, you simply run the application again (without restarting AVD) and that's it.

十雾 2024-08-18 03:41:02

运行配置目标擦除用户数据 → 运行。

它解决了我的问题。

Run configurationsTargetWipe user data → Run.

It fixed the problem in my case.

ㄖ落Θ余辉 2024-08-18 03:41:02

这是对我有帮助的答案:
link text

对我来说另一个解决方案是启动 avd 管理器并从那里启动一个模拟器。之后一切都恢复正常。

Here is the answer that helped me:
link text

Another solution for me is start the avd manager and start once emulator from there. After that everything turns to normal.

许你一世情深 2024-08-18 03:41:02

AFAIK,当模拟器启动但 Android 调试桥无法与其建立连接时会发生这种情况。

如果您刚刚使用应用程序启动模拟器,请注意控制台中是否出现 Waiting for HOME to launch... 或类似内容。

如果您没有收到该消息,但模拟器已启动,您很可能会再次遇到错误:用户数据映像被另一个模拟器使用的情况。

AFAIK, this happens when an emulator is started, but the Android Debug Bridge couldn't establish connection to it.

If you have just started the emulator with your application, watch if you get Waiting for HOME to launch... or something similar in your Console.

If you don't get that message, but the emulator has been started, chances are, you'll get into the ERROR: the user data image is used by another emulator situation again.

别靠近我心 2024-08-18 03:41:02

模拟器:错误:用户数据映像已被另一个模拟器使用。中止

尝试重新启动计算机,因为我之前做了很多乱七八糟的事情,但没有同样的错误。

去关闭 ADB,所以当我在 XP 上时,我运行 > cmd 然后粘贴> cd C:\Program Files\Android\android-sdk\platform-tools (XP 上 ADB 的位置)

尝试过

adb Kill-server && adb start-server

然后将 C:\Documents and Settings\.android\avd\ 中的目录 cache.img.lock 和 userdata-qemu.img.lock 移动到新文件夹(而不是删除),

效果很好。

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

Tried restarting the computer as I had done a lot of messing around earlier but no joy same error.

Went to shut down ADB so as I'm on XP I run > cmd then paste in > cd C:\Program Files\Android\android-sdk\platform-tools (the location of the location for the ADB on XP)

Tried

adb kill-server && adb start-server

Then moved the directories cache.img.lock and userdata-qemu.img.lock in the C:\Documents and Settings\.android\avd\ to a New folder (instead of deleting)

This worked fine.

初相遇 2024-08-18 03:41:02

删除现有的模拟器,然后创建一个新的。

当我遇到这个问题并且找不到要删除的文件夹时,这对我有用。

Delete the existing emulators and then make a new one.

This worked for me, when I had this problem and couldn't find the folders to delete.

酒解孤独 2024-08-18 03:41:02

运行配置下 -->目标-->添加命令行选项

adb kill-server && adb start-server

每次运行应用程序时添加此选项将杀死并重新启动 adb 服务器。

Under Run Configurations --> Target --> Add Command Line Options add this

adb kill-server && adb start-server

every time running your App will kill-restart the adb server.

花桑 2024-08-18 03:41:02

这可能是 ADT 安装错误。尝试卸载该插件,重新启动 Eclipse,然后重新安装。

您不会让模拟器一直启动并在 ADT/ADB 可以安装/运行您的应用程序之前将其关闭。

It's probably a bad install of ADT. Try uninstalling the plugin, restarting Eclipse, then installing it again fresh.

That of you aren't letting the emulator boot all the way up and are closing it before ADT/ADB can install/run your app.

卷耳 2024-08-18 03:41:02
  1. 请为模拟器设置wipe_data
  2. 使用相同的应用程序实例(修改后,如果有的话)以避免出现错误。
  1. Please set wipe_data for emulator
  2. Use same instance of application (after modification if any) to avoid error you are getting.
╰沐子 2024-08-18 03:41:02

如果您使用网络共享作为主文件夹,也可能会发生这种情况,因为某些网络文件共享系统可能会锁定图像文件。

This can also happen if you're using a network share as your home folder, because some network file sharing systems may lock the image files.

别想她 2024-08-18 03:41:02

删除目录cache.img.lock和userdata-qemu.img.lock(在我的例子中,这些文件位于/mylocalusername/.android/avd/avd7.avd

Delete the directories cache.img.lock and userdata-qemu.img.lock (in my case these files are in /mylocalusername/.android/avd/avd7.avd

岁月静好 2024-08-18 03:41:02

谢谢你!只是为一些在 Windows XP 中开发的人补充一下。

avd目录的路径可以是C:\Documents and Settings\.android\avd

再次感谢您的回答! :)

Thanks for this! Just to add for some people who develop in Windows XP.

The path to the avd directory can be C:\Documents and Settings\.android\avd

Thanks again for the answer! :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文