Skip to content

Android Studio

Introduction

Android Studio is the easiest way to install and manage the Android SDK and Platform Tools, which are essential for automated testing with Appium. This section focuses on installing Android Studio and configuring the environment for using the Android SDK.

Download

To download Android Studio, follow these steps:

  1. Go to the Android Studio download page.
  2. Click on the Download Android Studio button.
  3. Verify the correct platform: Windows or Mac installer.
  4. Accept the terms and conditions to start the download.

Android Studio Installation

Windows

  1. Run the downloaded installer file.
  2. Follow the installation wizard instructions, keeping the default configurations.

macOS

  1. Open the downloaded .dmg file.
  2. Drag and drop the Android Studio icon into the Applications folder.

SDK and Tools installation

After installing Android Studio, you need to install SDK Tools and Client Tools.

  1. Open Android Studio and click on More actions -> SDK Manager.

    More actions

  2. Click on SDK Platform. Choose one recent SDK to install it and click on Apply.

    SDK installing

  3. Click on SDK Tools.

  4. Make sure all these components are checked:

    • Android SDK Build-Tools
    • Android SDK Command-line Tools (latest)
    • Android SDK Platform-Tools (latest)
    • Android Emulator

    Settings

  5. Click on Apply.

Create the ANDROID_HOME variable

The ANDROID_HOME is an environment variable which many tools read to determine the Android SDK installation directory.
To check if ANDROID_HOME is defined, open the terminal and type:

powershell
$env:ANDROID_HOME
shell
echo $ANDROID_HOME

The correct output for this command should be a text like this:

text
C:\Users\<your-username>\AppData\Local\Android\Sdk
text
/Users/<your-username>/Library/Android/sdk

Verify that the above output value matches the existing Android SDK installation folder on your system.
If the value is missing or invalid, update/create an environment variable named ANDROID_HOME. To create/update an environment variable, follow the instructions here.

Add to PATH

Add the following directories to the system PATH:

  1. Platform Tools:

    text
    C:\Users\<your-username>\AppData\Local\Android\Sdk\platform-tools
    text
    /Users/<your-username>/Library/Android/sdk/platform-tools

    To add a directory to the system path, follow the instructions here.

  2. Cmdline Tools (bin):

    text
    C:\Users\<your-username>\AppData\Local\Android\Sdk\cmdline-tools\latest\bin
    text
    /Users/<your-username>/Library/Android/sdk/cmdline-tools/latest/bin

    To add a directory to the system path, follow the instructions here.

Verify Configuration

  1. Open a terminal.
  2. Run the command:
    shell
    adb --version
    This should return the version of ADB (Android Debug Bridge).
  3. Run the command:
    shell
    sdkmanager --version
    This should return the version of Android SDK Manager.

More Information

For more details and advanced configurations, refer to the official Android Studio documentation.