【我的Android进阶之旅】解决Android Studio 启动模拟器出现错误:AVD is already running , delete the *.lock and try again

一、问题描述

【我的Android进阶之旅】解决Android Studio 启动模拟器出现错误:AVD is already running , delete the *.lock and try again_第1张图片

AVD 4_WVGA_Nexus_S_API_28 is already running.
If that is not the case, delete the files at
   C:\Users\000\.android\avd/4_WVGA_Nexus_S_API_28.avd/*.lock
and try again.

在这里插入图片描述
这个模拟器启动不了。

二、分析问题

2.1 删除 *.lock文件

按照提示,进入到 C:\Users\000.android\avd\4_WVGA_Nexus_S_API_28.avd 目录,查看 *.lock文件

【我的Android进阶之旅】解决Android Studio 启动模拟器出现错误:AVD is already running , delete the *.lock and try again_第2张图片

进入目录,执行命令 删除掉所有的 *.lock文件以及文件夹,如下所示
【我的Android进阶之旅】解决Android Studio 启动模拟器出现错误:AVD is already running , delete the *.lock and try again_第3张图片

Microsoft Windows [Version 10.0.10240]
(c) 2015 Microsoft Corporation. All rights reserved.

C:\Users\000>cd C:\Users\000\.android\avd\4_WVGA_Nexus_S_API_28.avd

C:\Users\000\.android\avd\4_WVGA_Nexus_S_API_28.avd>ls
AVD.conf         emu-launch-params.txt    hardware-qemu.ini.lock  sdcard.img.qcow2         version_num.cache
cache.img        emulator-user.ini        multiinstance.lock      snapshots
cache.img.qcow2  encryptionkey.img        quickbootChoice.ini     userdata-qemu.img
config.ini       encryptionkey.img.qcow2  read-snapshot.txt       userdata-qemu.img.qcow2
data             hardware-qemu.ini        sdcard.img              userdata.img

C:\Users\000\.android\avd\4_WVGA_Nexus_S_API_28.avd>rm *.lock
rm: cannot remove 'hardware-qemu.ini.lock': Is a directory

C:\Users\000\.android\avd\4_WVGA_Nexus_S_API_28.avd>rm *.lock -rf

C:\Users\000\.android\avd\4_WVGA_Nexus_S_API_28.avd>

2.2 重新点击启动

删除掉 *.lock文件夹以及文件之后,就可以正常启动模拟器了
【我的Android进阶之旅】解决Android Studio 启动模拟器出现错误:AVD is already running , delete the *.lock and try again_第4张图片


作者:欧阳鹏 欢迎转载,与人分享是进步的源泉!
转载请保留原文地址:https://blog.csdn.net/qq446282412/article/details/100116441
☞ 本人QQ: 3024665621
☞ QQ交流群: 123133153
☞ github.com/ouyangpeng
[email protected]


【我的Android进阶之旅】解决Android Studio 启动模拟器出现错误:AVD is already running , delete the *.lock and try again_第5张图片

【我的Android进阶之旅】解决Android Studio 启动模拟器出现错误:AVD is already running , delete the *.lock and try again_第6张图片

你可能感兴趣的:(Android应用开发)