Run apps on the Android Emulator

Stay organized with collections Save and categorize content based on your preferences.

The Android Emulator simulates Android devices on your computer so that you can test your application on a variety of devices and Android API levels without needing to have each physical device. The emulator offers these advantages:

  • Flexibility: In addition to being able to simulate a variety of devices and Android API levels, the emulator comes with predefined configurations for various Android phone, tablet, Wear OS, and Android TV devices.

  • High fidelity: The emulator provides almost all of the capabilities of a real Android device. You can simulate incoming phone calls and text messages, specify the location of the device, simulate different network speeds, simulate rotation and other hardware sensors, access the Google Play Store, and much more.

  • Speed: Testing your app on the emulator is in some ways faster and easier than doing so on a physical device. For example, you can transfer data faster to the emulator than to a device connected over USB.

In most cases, the emulator is the best options for your testing needs. This page covers the core emulator functionalities and how to get started with it.

Alternatively, you can deploy your app to a physical device. For more information, see Run apps on a hardware device.

Get started with the emulator

The Android Emulator enables you to test your app on many different devices, virtually. The emulator comes with Android Studio by default, so you shouldn’t have to manually install it. The basic workflow with the emulator goes as follows:

  1. Verify that you have the system requirements.
  2. Create an Android Virtual Device (AVD).
  3. Run your app on the emulator.
  4. Navigate the emulator.

This page covers the steps to set up and explore your virtual testing environment in more detail. If you already have your app running on the emulator and are ready to use more advanced features, see Advanced emulator usage.

If you’re experiencing issues with the emulator, see Troubleshoot emulator. Depending on your needs and resources, it might be worth delving into system requirements and technical configurations, or it might be better to use a physical device.

Emulator system requirements

For the best experience, you should use the emulator in Android Studio on a computer with the following specs:

  • 16GB RAM
  • 64-bit Windows, macOS, Linux, or ChromeOS operating system
  • 16GB disk space

If you don’t have these specs, the emulator might still run, but it probably won’t be smooth. In this case, consider testing on a physical device instead by following the guidance at Run apps on a hardware device.

Create an Android Virtual Device

Each instance of the Android Emulator uses an Android virtual device (AVD) to specify the Android version and hardware characteristics of the simulated device. To effectively test your app, you should create an AVD that models each device on which your app is designed to run. To create an AVD, see Create and manage virtual devices.

Each AVD functions as an independent device, with its own private storage for user data, SD card, and so on. By default, the emulator stores the user data, SD card data, and cache in a directory specific to that AVD. When you launch the emulator, it loads the user data and SD card data from the AVD directory.

Run your app on the emulator

After you have created an Android Virtual Device (AVD), you can start the Android Emulator and run an app in your project:

  1. In the toolbar, select the AVD that you want to run your app on from the target device drop-down menu.

  2. Click Run. The emulator might take a minute or so to launch for the first time, but subsequent launches will use a snapshot and should launch faster. If you experience issues at this point, see Troubleshoot the emulator.

Once your app is installed on your AVD, you can run it from the device as you would run any app on a device. Any time you want to deploy new changes though, you need to click Run or Apply Changes again.

Wear OS pairing assistant

If you want to test your app with Wear OS devices, the Wear OS pairing assistant guides you step-by-step through pairing Wear OS emulators with physical or virtual phones directly in Android Studio. To learn more, see Use the Wear OS emulator pairing assistant.

While the emulator is running, you can use your computer mouse to mimic your finger on the touch screen, and use the emulator panel to perform common actions.

Use your computer mouse pointer to mimic your finger on the touchscreen; select menu items and input fields; and click buttons and controls. Use your computer keyboard to type characters and enter emulator shortcuts.

Table 1. Gestures for navigating the emulator

Feature Description
Swipe the screen Point to the screen, press and hold the primary mouse button, swipe across the screen, and then release.
Drag an item Point to an item on the screen, press and hold the primary mouse button, move the item, and then release.
Tap
(touch)
Point to the screen, press the primary mouse button, and then release. For example, you could click a text field to start typing in it, select an app, or press a button.
Double tap Point to the screen, press the primary mouse button quickly twice, and then release.
Touch and hold Point to an item on the screen, press the primary mouse button, hold, and then release. For example, you could open options for an item.
Type You can type in the emulator by using your computer keyboard, or using a keyboard that pops up on the emulator screen. For example, you could type in a text field after you selected it.
Pinch and spread
Pressing Control (Command on Mac) brings up a pinch gesture multi-touch interface. The mouse acts as the first finger, and across the anchor point is the second finger. Drag the cursor to move the first point.
Clicking the left mouse button acts like touching down both points, and releasing acts like picking both up.
Vertical swipe Open a vertical menu on the screen and use the scroll wheel (mouse wheel) to scroll through the menu items until you see the one you want. Click the menu item to select it.

Perform common actions using the emulator panel

To perform common actions with the emulator, use the emulator toolbar (if you're running the emulator within Android Studio) or the panel on the right side (if you're running the emulator in a window outside of Android Studio). Table 2 describes the common emulator actions and associated buttons.

You can use keyboard shortcuts to perform many common actions in the emulator. For a complete list of shortcuts in the emulator, press F1 (Command + / on Mac) to open the Help pane in the Extended controls window.

Table 2. Common actions in the emulator

Feature Description
Close
Close icon
Close the emulator.
Minimize
Minimize icon
Minimize the emulator window.
Resize Resize the emulator as you would any other operating system window. The emulator maintains an aspect ratio appropriate for your device.
Power
Power icon
Click to turn the screen on or off.
Click and hold to turn the device on or off.
Volume up
Volume Up icon
Click to view a slider control and turn the volume up. Click again to turn it up more, or use the slider control to change the volume.
Volume down
Volume Down icon
Click to view a slider control and turn the volume down. Click again to turn it down more, or use the slider control to change the volume.
Rotate left
Rotate Left icon
Rotate the device 90 degrees counterclockwise.
Rotate right
Rotate Right icon
Rotate the device 90 degrees clockwise.
Take screenshot
Take Screenshot icon
Click to take a screenshot of the device. For details, see Screenshots.
Enter zoom mode
Enter Zoom Mode icon

Click so the cursor changes to the zoom icon. To exit zoom mode, click the button again.

Zoom in and out in zoom mode:

  • Left-click the screen to zoom in by 25%, up to a maximum of about twice the screen resolution of the virtual device.
  • Right-click to zoom out.
  • Left-click and drag to select a box-shaped area to zoom in on.
  • Right-click and drag a selection box to reset to default zoom.

To pan in zoom mode, hold Control (Command on Mac) while pressing the arrow keys on the keyboard.

To tap the device screen in zoom mode, Control-click (Command-click on Mac).

Back
Back icon
Return to the previous screen, or close a dialog box, an options menu, the Notifications panel, or the onscreen keyboard.
Home
Home icon
Return to the Home screen.
Overview
Overview icon
(Recent Apps)
Tap to open a list of thumbnail images of apps you’ve worked with recently. To open an app, tap it. To remove a thumbnail from the list, swipe it left or right. This button isn't supported for Wear OS.
Fold
Fold icon
For foldable devices, fold the device to display its smaller screen configuration.
Unfold
Unfold icon
For foldable devices, unfold the device to display its larger screen configuration.
Button 1
Button 1 icon
For Wear devices, press Button 1 on the device. Only available on Wear devices running API level 28 or higher.
Button 2
Button 2 icon
For Wear devices, press Button 2 on the device. Only available on Wear devices running API level 30 or higher.
Palm
Palm button icon
For Wear devices, press your palm on the device screen. This sets your device to ambient mode. Only available on Wear devices running API level 28 or higher.
Tilt
Tilt button icon
For Wear devices, tilt the device. This exits ambient mode. Only available on Wear devices running API level 28 or higher.
Menu Press Control+M (Command+M on Mac) to simulate the Menu button.
More
More icon
Click to access other features and settings, described in the next table.

Update the emulator

To update the Android Emulator, select the Android Emulator component in the SDK Tools tab of the SDK Manager. For instructions, see Update your tools using the SDK Manager.