Android Studio Emulator

Learn how to set up the Android Emulator to test your app on a virtual Android device.

If you don't have an Android device available to test with, we recommend using the default emulator that comes with Android Studio. If you run into any problems setting it up, follow the steps in this guide.

Set up Android Studio's tools


Download and install Android Studio.


Open the Android Studio app, click More Actions and then select SDK Manager.


Open Android Studio, go to Settings > Languages & Frameworks > Android SDK. From the SDK Platforms tab, select the latest Android version (API level).

Android SDK Platforms

Then, click on the SDK Tools tab and make sure you have at least one version of the Android SDK Build-Tools and Android Emulator installed.

Android SDK build tools.


Copy or remember the path listed in the box that says Android SDK Location.

Android SDK location.


Click Apply and OK to install the Android SDK and related build tools.


If you are on macOS or Linux, add an environment variable pointing to the Android SDK location in ~/.bash_profile (or ~/.zshrc if you use Zsh). For example: export ANDROID_HOME=/your/path/here. If you are using Windows, add %LOCALAPPDATA%\Android\Sdk\emulator to the Path.

Add the following lines to your /.zprofile or ~/.zshrc (if you are using bash, then ~/.bash_profile or ~/.bashrc) config file:

export ANDROID_HOME=$HOME/Library/Android/sdkexport PATH=$PATH:$ANDROID_HOME/emulatorexport PATH=$PATH:$ANDROID_HOME/platform-tools


Reload the path environment variables in your current shell:

# for bashsource $HOME/.bashrc
# for zshsource $HOME/.zshrc


Finally, make sure that you can run adb from your terminal.

Set up a virtual device


On the Android Studio main screen, click More Actions, then Virtual Device Manager in the dropdown.

Android Studio configure.


Click the Create device button.

Android Studio create virtual device.


Under Select Hardware, choose the type of hardware you'd like to emulate. We recommend testing against a variety of devices, but if you're unsure where to start, the newest device in the Pixel line could be a good choice.

Android Studio create virtual device hardware selection.


Select an OS version to load on the emulator (probably one of the system images in the Recommended tab), and download the image.

Android Studio create virtual device os selection.


Change any other settings you'd like, and press Finish to create the virtual device. You can now run this device anytime by pressing the Play button in the AVD Manager window.

Multiple adb versions

Having multiple adb versions on your system can result in the following error:

adb server version (xx) doesn't match this client (xx); killing...

This is because the adb version on your system is different from the adb version on the Android SDK platform-tools.


Open the terminal and check the adb version on the system:

adb version


And from the Android SDK platform-tool directory:

cd ~/Library/Android/sdk/platform-tools
./adb version


Copy adb from Android SDK directory to usr/bin directory:

sudo cp ~/Library/Android/sdk/platform-tools/adb /usr/bin
  • Ask a question on the forums

  • Edit this page

Was this doc helpful?