Step #3: Set Up the AVD

The Android emulator can emulate one or several Android devices. Each configuration you want is stored in an “Android virtual device”, or AVD. The AVD Manager is where you create these AVDs.

To open the AVD Manager in Android Studio, choose Tools > AVD Manager from the main menu.

You should be taken to “welcome”-type screen:

Android Studio AVD Manager, Welcome Screen
Android Studio AVD Manager, Welcome Screen

Click the “Create Virtual Device” button, which brings up a “Virtual Device Configuration” wizard:

Android Studio Virtual Device Configuration Wizard, First Page
Android Studio Virtual Device Configuration Wizard, First Page

The first page of the wizard allows you to choose a device profile to use as a starting point for your AVD. The “New Hardware Profile” button allows you to define new profiles, if there is no existing profile that meets your needs.

Since emulator speeds are tied somewhat to the resolution of their (virtual) screens, you generally aim for a device profile that is on the low end but is not completely ridiculous. For example, a 1280x768 or 1280x720 phone would be considered by many people to be fairly low-resolution. However, there are plenty of devices out there at that resolution (or lower), and it makes for a reasonable starting emulator.

If you want to create a new device profile based on an existing one — to change a few parameters but otherwise use what the original profile had — click the “Clone Device” button once you have selected your starter profile.

However, in general, at the outset, using an existing profile is perfectly fine. The Nexus 4 image is a likely choice to start with.

Clicking “Next” allows you to choose an emulator image to use:

Android Studio Virtual Device Configuration Wizard, Second Page
Android Studio Virtual Device Configuration Wizard, Second Page

The emulator images are spread across three tabs:

Each of those tabs lists a bunch of possible emulator images, where those tables have cryptic columns like “API Level” and “Release Name”. We will get into what those are a bit later in the book. For right now, the key column is the “Target” column. This will tell you what version of Android the emulator emulates, such as “Android 8.1” or “Android 5.1”. For the time being, whether the “Target” has “(Google APIs)” or not does not matter very much.

On some of these tabs, you should see some entries with a “Download” link, and you might see others without it. The emulator images with “Download” next to them will trigger a one-time download of the files necessary to create AVDs for that particular API level and CPU architecture combination, after another license dialog and progress dialog:

Android Studio Component Installer Dialog, Downloading API 28 Image
Android Studio Component Installer Dialog, Downloading API 28 Image

Once you have identified the image that you want — and have downloaded it if needed — click on one of them in the wizard. Clicking “Next” allows you to finalize the configuration of your AVD:

Android Studio Virtual Device Configuration Wizard, Third Page
Android Studio Virtual Device Configuration Wizard, Third Page

A default name for the AVD is suggested, though you are welcome to replace this with your own value. However, that name must be something valid: only letters, numbers, spaces, and select punctuation (e.g., ., _, -, (, )) are supported.

The rest of the default values should be fine for now.

Clicking “Finish” will return you to the main AVD Manager, showing your new AVD. You can then close the AVD Manager window.


Prev Table of Contents Next

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