Mac android emulator coding

broken image
broken image
broken image

Starting from Mac OS 10.10 (and working at least until 10. Since Android 4.x, Intel developed an x86-based Android emulator using KVM on Linux and Intel HAXM for Windows and macOS X. What we want to achieve here is to define the ANDROID_AVD_HOME environment variable in a way that makes it available to applications launched from the Finder. And of course, the thousands of documents about how to do it in Windows are of no help at all, and the few that are about the Mac are really, really outdated. But if you try to set them under Appearance & Behavior > Path Variables in the Android Studio Preferences, because you think it would be a reasonable thing to do, then you might waste a lot of time, because it does not work. It’s easy enough to find out that you should modify either the ANDROID_SDK_ROOT, ANDROID_EMULATOR_HOME, or ANDROID_AVD_HOME environment variables (or even ANDROID_HOME, if you’re unlucky enough to find some really outdated documents). It’s possible, but if you’re lucky like I am, you might run into some hurdles. Imagine you’d like to reclaim space on your Mac’s main hard drive by moving your Android Studio Virtual Devices (the phones and tablets you run in the Android Emulator to test your applications).