运行android程序时出现ERROR: the user data image is used by another emulator. aborting 的解决办法

问题概述:

在启动Android模拟器时出现以下错误,导致启动失败。

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

 

原因:

系统判断你当前已经启动了另外一个emulator,可能是某些正常操作或异常退出造成的。

 

解决方法:

第一种:进入你avd目录下:

如:C:\Documents and Settings\Administrator\.android\avd\htcg10avd

删除以lock结尾的文件夹。(我简单解释下为什么要删除这些文件呢,其实.lock是加锁,如果程序崩溃等原因导致无法清除这些以.lock结尾的文件夹,就会出现这个问题,也就是这个avd的锁没有被释放,导致avd manager以为这个avd正在使用当中。

第二种:打开dos控制器,在里面输入adb kill-server,然后再输入adb start-server,两个指令搞定,然后你就能顺利的运行你的程序了。

以上两种方法,你喜欢哪种就用哪种,不过,我推荐用第二种,方便,快捷。不用重启那个虚拟机,启动那个东西实在是太慢了。


你可能感兴趣的:(运行android程序时出现ERROR: the user data image is used by another emulator. aborting 的解决办法)