The emulator process for AVD Pixel_4_XL_API_30 was killed

Viewed 1295

While trying to run the emulator I'm getting this error:

The emulator process for AVD Pixel_4_XL_API_30 was killed

I have updated my Android Studio and everything also deleted old AVD created new one still same error.

error-image

3 Answers

This happens when the drive where your emulator is don't have enough space on it. Check for the drive it should be having 7-10 GB free space.

If that doesn't work Edit your AVD and change Graphics option to Software as it might be the graphics issue too. Also update the emulator if its available.

Also check for your ANDROID_HOME variable. Check if its pointing to the right location. It should be your SDK location.

I was faced with the same problem. I tried several solutions from stackoverflow but it didn't work. Finally I noticed that this issue occurs from macOS Big Sur 11.3 update.

Steps to fix the issue:

  1. Open Terminal and go to the directory /Users/<username>/Library/Android/sdk/emulator/qemu/darwin-x86_64/

  2. Create an xml file named entitlements.xml with touch or cat commands

  3. Add this content to the entitlements.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.security.hypervisor</key>
    <true/>
</dict>
</plist>
  1. Then simply sign the qemu-system-x86_64 with it:
codesign -s - --entitlements entitlements.xml --force qemu-system-x86_64

Now simply restart Android Studio and the Android Emulator should work again!

In my case it was because of small amount memory. I did notice that about 7Gb SSD memory needed to launch AVD. It works for me )

Related