AVD Manager: The emulator process for AVD was killed. Android Studio 4.1.3 and MacOS High Sierra 10.13.6
Asked Answered
T

9

18

I receive the error in object. I tried to do all the checks (all upgraded and proper installed) but I continue to have the error:

AVD Manager:

The emulator process for AVD was killed.

AVD Manager: The emulator process for AVD was killed.

Here are the details of the emulator:

Name: Pixel_3a_API_30
CPU/ABI: Google Play Intel Atom (x86)
Path: /Users/simone/.android/avd/Pixel_3a_API_30.avd
Target: google_apis_playstore [Google Play] (API level 30)
Skin: pixel_3a
SD Card: 512M
fastboot.chosenSnapshotFile: 
runtime.network.speed: full
hw.accelerometer: yes
hw.device.name: pixel_3a
hw.lcd.width: 1080
hw.initialOrientation: Portrait
image.androidVersion.api: 30
tag.id: google_apis_playstore
hw.mainKeys: no
hw.camera.front: emulated
avd.ini.displayname: Pixel 3a API 30
hw.gpu.mode: software
hw.ramSize: 1536
PlayStore.enabled: true
fastboot.forceColdBoot: no
hw.cpu.ncore: 4
hw.keyboard: yes
hw.sensors.proximity: yes
hw.dPad: no
hw.lcd.height: 2220
vm.heapSize: 256
skin.dynamic: yes
hw.device.manufacturer: Google
hw.gps: yes
hw.audioInput: yes
image.sysdir.1: system-images/android-30/google_apis_playstore/x86/
showDeviceFrame: yes
hw.camera.back: virtualscene
AvdId: Pixel_3a_API_30
hw.lcd.density: 440
hw.arc: false
hw.device.hash2: MD5:0e6953ebf01bdc6b33a2f54746629c50
fastboot.forceChosenSnapshotBoot: no
fastboot.forceFastBoot: yes
hw.trackBall: no
hw.battery: yes
hw.sdCard: yes
tag.display: Google Play
runtime.network.latency: none
disk.dataPartition.size: 2G
hw.sensors.orientation: yes
avd.ini.encoding: UTF-8
hw.gpu.enabled: yes
Timtima answered 3/1, 2021 at 9:20 Comment(2)
Here I have more detals on the log: Application Specific Information: *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty NSArray' abort() called terminating with uncaught exception of type NSExceptionTimtima
I think you have setting problem try re installing your adb , and also check if you SDK location is set correctly in the project structure and weather you have installed the latest dependenciesLiebman
M
14

When emulating on a M1 Mac you need to select a system image from the "Other Images" Tab. Make sure you take a arm64 image.

There is also a preview-repo from google regarding M1-emulation.

enter image description here

Mcnally answered 26/5, 2021 at 9:38 Comment(0)
P
12

Fix: Follow the guide here Codesign QEMU. Use /Users/<username>/Library/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64 as the directory for qemu (might be different).

The issue I had was with qemu-system-x86_64. Running the emulator in terminal would show this error: cannot add library /Users/<username>/Library/Android/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libvulkan.dylib: failed.

To fix it I found these posts: Reddit Codesign QEMU

Postbellum answered 27/4, 2021 at 15:33 Comment(4)
Thanks! That did the trick here, running macOS Big Sur 11.3, and Android Studio 4.1.3 :-)Oxfordshire
@Oxfordshire The 11.3 update is what broke it for me, it was working fine before that.Postbellum
this one works for me. In my case, the issue was with qemu-system-i386 but following the guide pointed above I resolved itJarry
Thanks! This made magic for me too. Running macOS Big Sur 11.3, and Android Studio 4.1.3Limekiln
D
7

UPDATED - 28/4/2021

  1. create entitlements.xml file with the following content:

    <?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. and run on qemu path as necessary where your SDK is located.
codesign -s - --entitlements entitlements.xml --force ~/Library/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64

Answer based on https://www.arthurkoziel.com/qemu-on-macos-big-sur/

Related issues:

https://issuetracker.google.com/issues/181142249 https://issuetracker.google.com/issues/186436367

Update to Android Emulator 3.5.6 should fix it now

Original solution >>> Thanks to laalto

Darr answered 28/4, 2021 at 6:44 Comment(2)
Additional thanks for mentioning the "qemu" Path.Text
Fixed my emulator after updating to macOS 11.3Froebel
L
3

Change "hw.gpu.mode: auto" to "hw.gpu.mode = software".

Lambent answered 20/1, 2021 at 21:13 Comment(6)
It worked for a while, after the new update of Intel x86 Emulator Accellerator (HAXM installer) v7.6.5, I have the same issue :-(Timtima
Same here… not working anymore, with HAXM 7.6.5, updated within Android StudioOxfordshire
Same after HAXM 7.6.5Achieve
Same, HAXM 7.6.5 seems to be not working. Is it possible to downgrade?Postbellum
@DhananjaySuresh I tried manually installing 7.6.1 from the GitHub repo… couldn't get it to work either… I even uninstalled Android Studio and all of its dependencies, then reinstalled it all… nothing seems to work here :-/ — at least not in my limited knowledge towards Android development and related.Oxfordshire
@Oxfordshire See my answer, not sure if it will be the fix you need but it worked for me.Postbellum
T
1

I have faced this issue before, just follow step below;

  1. Go to SDK Manager -> SDK Tools
  2. Update 2 option below:
    • Android emulator
    • Intel x86 Emulator Accelerator (HAXM Installer)

enter image description here

Telephoto answered 12/5, 2021 at 8:26 Comment(0)
N
0

Android Emulator's previous version seems to be not working with HAXM 7.6.5. If you install the new version of Android Emulator(30.5.6), It will work properly. If it still is not working, you should try cold boot. it worked for me.

Nathalie answered 2/5, 2021 at 20:54 Comment(0)
S
0

it happened to me on windows 10 and the problem was in a file system called winspool.drv try to fix this file this what solved the problem for me open cmd in windows and run it as administrator and type this command sfc /scannow it will make a scan and will repair the corrupted file after the scan finished restart your computer and try to run the emulator again

Sobel answered 27/5, 2021 at 15:16 Comment(0)
J
0

You can use Android Emulator Apple Silicon Preview. I tried all other options and nothing works for me.

However this have some limitations currently. Probably will work better in the future.

Currently know issues are explained here as well. https://androidstudio.googleblog.com/2020/12/android-emulator-apple-silicon-preview.html

Here is one good article about this journey and full setup and faced issues with different solutions: https://medium.com/mobile-app-development-publication/my-journey-to-setup-android-emulator-for-m1-macbook-pro-b8365321b3e7

Jodee answered 16/7, 2021 at 21:39 Comment(0)
S
-3

This has a very simple solution only if the installation process is complete and still the emulator is not launching, Solution: Just try to use older API version or any older stable android API version. In my case the latest version I was having was API-31, but the API-28 worked for me. Change your android API to any older version Try it. This worked for me.

Scrawny answered 2/8, 2021 at 10:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.