Android 模拟器问题
当我启动模拟器时,我遇到很多问题(错误):-
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(13)
我的计算机锁定后也遇到了同样的问题,我必须重新启动它。
擦除用户数据并没有解决我的问题,我必须手动删除以下文件夹
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
显然有效的快速修复方法是每次发生此错误时重新启动 adb 服务器:
然后,您只需再次运行应用程序(无需重新启动 AVD)即可。
A quick-fix that obviously works is to restart the adb server each time this error occurs:
Then, you simply run the application again (without restarting AVD) and that's it.
运行配置 → 目标 → 擦除用户数据 → 运行。
它解决了我的问题。
Run configurations → Target → Wipe user data → Run.
It fixed the problem in my case.
这是对我有帮助的答案:
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.
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.模拟器:错误:用户数据映像已被另一个模拟器使用。中止
尝试重新启动计算机,因为我之前做了很多乱七八糟的事情,但没有同样的错误。
去关闭 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.
删除现有的模拟器,然后创建一个新的。
当我遇到这个问题并且找不到要删除的文件夹时,这对我有用。
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.
在运行配置下 -->目标-->添加命令行选项
每次运行应用程序时添加此选项将杀死并重新启动 adb 服务器。
Under Run Configurations --> Target --> Add Command Line Options add this
every time running your App will kill-restart the adb server.
这可能是 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.
如果您使用网络共享作为主文件夹,也可能会发生这种情况,因为某些网络文件共享系统可能会锁定图像文件。
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.
删除目录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
谢谢你!只是为一些在 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! :)