Android Studio Emulator
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.
Step 1: Set up Android Studio's tools
Copy or remember the path listed in the box that says "Android SDK Location."
If you are on macOS or Linux, add the Android SDK location to your PATH using
~/.bashrc. You can do this by adding a line like
On macOS, you will also need to add
platform-tools to your
~/.bashrc., by adding a line like
Note that later versions of macOS, such as Catalina, use
zsh instead of
bash, so you will update
Make sure that you can run
adb from your terminal.
Step 2: Set up a virtual device
From the Android Studio main screen, go to
Tools -> AVD Manager.
Press the "+ Create Virtual Device" button.
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.
Select an OS version to load on the emulator (probably one of the system images in the "Recommended" tab), and download the image.
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.
adb versions on your system can result in the 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:
And from the Android SDK platform-tool directory:
adb from Android SDK directory to
$sudo cp ~/Android/sdk/platform-tools/adb /usr/bin