I had a long standing issue where I could only launch two emulators on my Macbook Pro simultaneously. Any other emulators would launch and get a black screen and wouldn’t load. I accepted this as fact, and carried on with life.
Finally today I found the need to figure out “why” this was the case as I wanted to start sharding my Android UI tests to speed them up. I was given the suggestion that it could be the # of CPUs or the amount of RAM. If you look in the logs you may see something like this (if you launch the emulator from
or you may see:
“HAXM does not have enough memory remaining to load this AVD.”
In order to change your memory allocation for HAXM, you need to re-install it, so run the installer again which is a DMG at: [$ANDROID_HOME/sdk/extras/intel/Hardware_Accelerated_Execution_Manager/ ] and this time select more memory. [HAXM Technical Docs]
Success!!! May the sharding begin!
- Stack Overflow: http://stackoverflow.com/questions/21031903/how-to-fix-hax-is-not-working-and-emulator-runs-in-emulation-mode
- LinkedIn Engineering Blog “3×3: Speeding Up Mobile Releases” by Drew Hannay – https://engineering.linkedin.com/blog/2016/02/3×3–speeding-up-mobile-releases