今天启动Android studio试运行一个demo,结果virtual Device启动失败,开始没找到原因,再次点击显示机器已经启动,但愣是没找到手机的影子。。。随意翻看面板,打开Run运行界面时发现如下错误提示,于是按照提示进行操作,后正常启动。
报错如下:
03/05 20:42:31: Launching app
Error while waiting for device: AVD Nexus_5X_API_28 is already running.
If that is not the case, delete the files at
/home/zhouxueli/.android/avd/Nexus_5X_API_28.avd/*.lock
and try again.
解决方案如下:
(o--o) CurrentEntry : /home/zhouxueli/.android/avd/Pixel_2_API_28.avd
zhouxueli@zhouxueli:~/.android/avd/Pixel_2_API_28.avd$ sudo rm -rf hardware-qemu.ini.lock
[sudo] password for zhouxueli:
zhouxueli@zhouxueli:~/.android/avd/Pixel_2_API_28.avd$ sudo rm -rf multiinstance.lock
zhouxueli@zhouxueli:~/.android/avd/Pixel_2_API_28.avd$ ll
total 633952
drwxrwxr-x 3 zhouxueli zhouxueli 4096 Mar 5 20:36 ./
drwxrwxr-x 5 zhouxueli zhouxueli 409