Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

emulator: ERROR: A snapshot operation for 'Nexus_4_API_27' is pending and timeout has expired. Exiting

emulator: ERROR: A snapshot operation for 'Nexus_4_API_27' is pending and timeout has expired. Exiting... 

I am getting this error when I am trying to open emulator from command-line with this bellow command.

anjan@anjan-HP-Laptop-15-bs0xx:~/Android/Sdk/emulator$ ./emulator -avd Nexus_4_API_27 

How to solve this problem?

like image 547
Anjan Biswas Avatar asked Apr 27 '18 05:04

Anjan Biswas


2 Answers

Open a terminal and execute:

sudo rm ~/.android/avd/your-device/*.lock 

This command will remove files like:

  • ~/.android/avd/your-device/hardware-qemu.ini.lock
  • ~/.android/avd/your-device/multiinstance.lock
  • ~/.android/avd/your-device/snapshot.lock.lock
like image 97
Juan Ignacio Barisich Avatar answered Sep 18 '22 14:09

Juan Ignacio Barisich


It is caused be the lock file generated by the boot which reside in the folder = .android/avd/{yourDeviceName}.

we can delete by using sudo rm snapshot.lock.lock command.

enter image description here

Then cold booting the device again ,solves the issue.

like image 29
Mukundhan Avatar answered Sep 21 '22 14:09

Mukundhan