Running the emulator on MacBook Air 2017 (Version 11.4 Beta)
The idea logs of emulator :
Emulator: /Users/gaurav12/Android_SDK/emulator/emulator -netdelay none -netspeed full -avd Pixel_2_API_30 Emulator: handleCpuAcceleration: feature check for hvf Emulator: cannot add library /Users/gaurav12/Android_SDK/emulator/qemu/darwin-x86_64/lib64/vulkan/libvulkan.dylib: failed Emulator: HVF error: HV_ERROR Emulator: qemu-system-x86_64: failed to initialize HVF: Invalid argument Emulator: Failed to open the hax module Emulator: No accelerator found. Emulator: qemu-system-x86_64: failed to initialize HAX: Operation not supported by device Emulator: added library /Users/gaurav12/Android_SDK/emulator/lib64/vulkan/libvulkan.dylib Emulator: cannot add library /Users/gaurav12/Android_SDK/emulator/qemu/darwin-x86_64/lib64/vulkan/libMoltenVK.dylib: failed Emulator: added library /Users/gaurav12/Android_SDK/emulator/lib64/vulkan/libMoltenVK.dylib 2021-04-26 14:53:28,526 [ 187258] WARN - n.process.BaseOSProcessHandler - Process hasn't generated any output for a long time.
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.
This error sometimes occurs because of out of date components like 'Android Emulator' or 'Android SDK Platform-Tools' components. Just update all pending updates, then Invalidate Caches & Restart, then try to create a new AVD.
Navigate to folder containing qemu binary (e.g. ~/Library/Android/sdk/emulator/qemu/darwin-x86_64
)
Create file entitlements.xml
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>
Make sure you have XCode command line tools installed
sudo xcode-select --install
Resign qemu binary:
codesign -s - --entitlements entitlements.xml --force ./qemu-system-x86_64
References:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With