Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR Android emulator gets killed

After updating to Android Studio 2 when I try to run my application and choose an emulator, I wait for the emulator to start and it suddenly gets killed. I can see the emulator process for some minutes but never the GUI. In Android studio, I get the error

android studio Error while waiting for the device: The emulator process for AVD was killed

This happens even if I run the emulator outside Android Studio. I have tried both an Android 6 and an Android 4.4-based emulator. Running on a Windows 7 x64 PC. Similar post to another StackOverflow post which was closed. I have tried various ram, VM heap, and resolution settings.

like image 492
Andreas Oikonomou Avatar asked Apr 25 '16 13:04

Andreas Oikonomou


People also ask

Why is my Android Studio Emulator not working?

If the Android Emulator does not start properly, this problem is often caused by problems with HAXM. HAXM issues are often the result of conflicts with other virtualization technologies, incorrect settings, or an out-of-date HAXM driver. Try reinstalling the HAXM driver, using the steps detailed in Installing HAXM.


3 Answers

I hit this issue trying to run Android API 30. In the end, I had to upgrade Android Emulator to 30.1.5 (it was 30.1.2 before this).

Android SDK Tools settings

like image 56
Soc Avatar answered Oct 22 '22 00:10

Soc


I had the same issue, the problem was there is not enough space in my disk drive.. you can see details about your specific situation in layer 'Event Log' this layer regularly is at the bottom on Android studio, it was my output Log:

"02:45 PM Emulator: emulator: ERROR: Not enough space to create userdata partition. Available: 3310.363281 MB at /home/user/.android/avd/my_Nexus_5X_API_27.avd, need 7372.800000 MB."

I had just 7 GB free, so just delete some GB's in my D.D. and it's working fine.

like image 35
Jonathan Marin Avatar answered Oct 21 '22 23:10

Jonathan Marin


For me it seems it was a problem that OpenGL didn't work on my machine. I fixed it as follows:

  1. Go to: Tools > Android > AVD Manager
  2. Press the "edit" (pencil) icon next to your AVD
  3. Change "Graphics" to "Software".
like image 132
Tim Cooper Avatar answered Oct 22 '22 01:10

Tim Cooper