Setting Up the Tools

Now, let us get you set up with the pieces and parts necessary to build an Android app.

NOTE: The instructions presented here are accurate as of the time of this writing. However, the tools change rapidly, and so these instructions may be out of date by the time you read this. Please refer to the Android Developers Web site for current instructions, using this as a base guideline of what to expect.

But First, Some Notes About Android’s Emulator

As mentioned in the previous chapter, the Android tools include an emulator, a piece of software that pretends to be an Android device. This is very useful for development — not only does it mean you can get started on Android without a device, but the emulator can help test device configurations that you do not own.

Emulators not only emulate Android itself, but also the CPU of the Android device. Most Android devices have ARM CPUs… but it is likely that your development machine has an x86 CPU. The emulator can emulate an ARM CPU when running on your x86 CPU, but it is slow. Fortunately, the emulator can also emulate an Android device that has an x86 CPU, and this runs much more quickly. You really want to be able to use the x86 emulator.

However, to use the x86 emulator, you will need some additional software:

And, the x86 emulator will only work for CPUs meeting certain requirements:

Development OS CPU Manufacturer CPU Requirements
macOS Intel any modern Mac should work
macOS Apple M1 unclear
Linux/Windows Intel support for Intel VT-x, Intel EM64T (Intel 64), and Execute Disable (XD) Bit functionality
Linux AMD support for AMD Virtualization (AMD-V) and Supplemental Streaming SIMD Extensions 3 (SSSE3)
Windows 10 April 2018 or newer AMD support for Windows Hypervisor Platform (WHPX) functionality

If your CPU does not meet those requirements, you will want to have one or more Android devices available to you, so that you can test on hardware rather than the emulator.

If you are running Windows or Linux, you need to ensure that your computer’s BIOS is set up to support “virtualization extensions”. Unfortunately, many PC manufacturers disable this by default. The details of how to get into your BIOS settings will vary by PC, but usually it involves rebooting your computer and pressing some function key on the initial boot screen. In the BIOS settings, you are looking for references to “virtualization”. Enable them if they are not already enabled. macOS machines come with virtualization extensions pre-enabled.

Part of the Android Studio installation process will try to set you up to be able to use the x86 emulator. Make note of any messages that you see in the installation wizard regarding “HAXM” (or, if you are running Linux, KVM), as those will be important later.

Note that Apple M1 chip support is still a work in progress. While Android Studio Arctic Fox appears to have M1 support, it also appears that this support is a bit rough in spots. Hopefully, this will smooth out with future versions of Android Studio.


Prev Table of Contents Next

This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.