$ANDROID_HOME/tools/bin/sdkmanager -install "system-images android-29 google_apis x86"Įcho "no" | $ANDROID_HOME/tools/bin/avdmanager -verbose create avd -force -name "pixel" -device "pixel" -package "system-images android-29 google_apis x86" -tag "google_apis" -abi "x86" $ANDROID_HOME/tools/bin/sdkmanager -install "emulator" Sudo $ANDROID_HOME/tools/bin/sdkmanager -update I am updating this thread to include a script we’ve recently found to be successfully launching emulators: #!/usr/bin/env bash Warning: Failed to find package system-images android-26 google_apis armeabi-v7a Warning: File /Users/vagrant/.android/repositories.cfg could not be loaded.
CustomCommandFlags: -no-window -no-audio -debug-initĮnsure sdk packages: įailed to update emulator sdk package, error: exit status 1, output: Loading package information. Sample build that failed: Log: INFO * Step dependency (go) installed, available.
In case of x86 emualtors it fails due to HAXM requirements, but in case of ARM it’s unable to download dependencies. It fails both for x86 emulators as well as for ARM. Unfortunately step AVD Manager fails no matter what kind of emulator is chosen.
Now that current Intel HAXM is removed, you can fresh install the latest version of it. This can be done by typing this command: $ sudo /Library/Extensions/intelhaxm.kext/Contents/Resources/uninstall.sh To make my machine clean, I uninstalled the current installed version. You can also double check with this command: $ kextstat | grep intel This can be done by typing this on your terminal: $ ~/Library/Android/sdk/tools/emulator -accel-check I arrived at the moby github issue page and found someone posted that Intel HAXM version 6.1.1 fixed this issue! I was happy, finally I can use my Android emulator and Docker at the same time on my macOS machine.įirst thing to do is to check what Intel HAXM version our emulator used. I was googling “ Docker Android emulator macOS fix” but had no luck, until a couple days ago. It was frustrating experience knowing that you couldn’t use Docker and Android emulator at the same time. Until I realize I need to use both of them at the same time.
I didn’t really care why, as long as I could use my emulator by stopping Docker that would be enough. I didn’t understand it under the hood how it couldn’t work together.
That actually made sense because both of them are using virtualization system on my machine to work. Then I realized when I stopped and closed Docker for Mac, it worked again! So I was thinking what could be possibly wrong with my Android emulator? I tried to close my other apps to see if some of it were conflicting with my emulator. So this kind of problem really made me down. So that’s why I always use Android emulator as first solution to test my app. I rarely use real phone to test my app since Google now provides best Android emulator experience. Every time I built the app, it just never showed up. Weeks ago, when I was working on Android project, I noticed something unusual on my macOS machine.