Android studio virtual Device 啟動失敗時某個報錯解決方案

智欣悅發表於2019-03-05

 今天啟動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       4096 Mar  5 19:52 ../
-rw-r--r-- 1 zhouxueli zhouxueli   69206016 Feb 28 14:22 cache.img
-rw-rw-r-- 1 zhouxueli zhouxueli       1218 Mar  5 20:02 config.ini
drwxrwxr-x 3 zhouxueli zhouxueli       4096 Mar  5 19:24 data/
-rw-rw-r-- 1 zhouxueli zhouxueli        166 Mar  5 19:24 emu-launch-params.txt
-rw------- 1 zhouxueli zhouxueli    1048576 Feb 28 14:22 encryptionkey.img
-rw-rw-r-- 1 zhouxueli zhouxueli  536870912 Feb 28 14:22 sdcard.img
-rw-rw-r-- 1 zhouxueli zhouxueli    1048576 Feb 28 14:22 userdata.img
-rw-r--r-- 1 zhouxueli zhouxueli 6442450944 Feb 28 14:22 userdata-qemu.img
 
  (o--o) CurrentEntry : /home/zhouxueli/.android/avd/Pixel_2_API_28.avd 
 
zhouxueli@zhouxueli:~/.android/avd/Pixel_2_API_28.avd$ 
 

相關文章