TL;DR - if you are having problems running the Android Emulator and Docker at the same time check that you actually have the latest version installed and don't rely on what the SDK Manager is reporting
Recently I've been having a problem developing Android Apps on a Mac using Android Studio whereby when I try and start an AVD nothing happens. Not a blank screen, not a crash, not a 'stuck at the Android logo' just nothing. The trouble started as soon as I installed Docker for Mac alongside Virtualbox.
I noticed that even when I wasn't actively using a container but had Docker itself running I experienced this problem but if I quit Docker the problem went away. Turns out there's an issue with earlier versions of Intel HAXM and other virtualisation technologies playing nicely together. The usual fix in these circumstances in to check you have the latest version installed - a quick check in the SDK manager would suggest I did. However, turns out despite the SDK manager reporting that the update has been installed, it has not - the 'installed' status simply means that the update has been downloaded and sits on your local storage.
Confirming what HAXM version you actually have installed
Within Android Studio go Tools > Android > SDK Manager and select the 'SDK Tools' tab. Look through the list to find 'Intel x86 Emulator Accelerator (HAXM installer)' and check the version column to see what version has been downloaded. If necessary then update it here to download the latest version.
SDK Manager suggesting HAXM 6.2.0 is installed and in use |
The best way to check what version is actually running is to drop in to a terminal and run the command emulator-check accel located at <sdk dir>/tools
You should get output along the lines of:
Confirmation that it is actually version 6.0.5 that is being used |
As you can see this is not as up to date as Android Studio is reporting. To actually install the downloaded copy navigate to <sdk dir>/extras/intel/Hardware_Accelerated_Execution_Manager and run HAXM installation. Once done run the check command again to confirm things have been updated, hopefully getting a result similar to:
Update to 6.2.0 confirmed as successful |
Note that the install is 'silent' so depending on the speed of your machine (it can take a while) it might look like it has hanged at first. Now the final check that all is well:
Docker and Android Emulator running at the same time |
Result: Docker and Android Emulator finally happily co-existing :)
Comments
Post a Comment