Android Studio Setup

Installing Android Studio

  1. Download the appropriate installer for your environment from https://developer.android.com/studio.

  2. Launch the installer.

  3. Follow the installation steps and select the default settings.

Configuring Android Studio

Setting ANDROID_HOME

Once Android Studio IDE is installed, add Global Environment Variable ANDROID_HOME:

  1. For Windows:

    1. Navigate to Environment Variables > Settings > System Variables > New.

    2. Add ANDROID_HOME with value of C://Users/Your_User/Appdata/Local/Android/ SDK

      The above value assumes you accepted the default path during installation. If you specified a different path, enter that path for the value of ANDROID_HOME.

  2. For macOS:

    1. Open a Terminal and type: echo export "ANDROID_HOME=/Users/yourName/Library/Android/sdk" >> ~/.bash_profile

    2. Close Terminal and open a new one and type echo $ANDROID_HOME to verify that the value exists.

  3. For Linux:

    1. Open a terminal in the same directory of installation and sudo nano .bashrc

    2. Them add to the file: export ANDROID_HOME=${HOME}/Android/Sdk export PATH=${PATH}:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/tools

    3. Close the terminal and type in a new one echo $ HOME

Setting Android Debug Bridge Location

Android Debug Bridge (adb) is a command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps. adb provides access to a Unix shell that you can use to run a variety of commands on a device.

  1. Open Android Studio IDE.

  2. In the Tools menu, select SDK Manager.

  3. Copy the SDK Location. “path_copied“

  4. Copy the SDK Location. “path_copied“

    1. For Windows:

      1. Open a cmd console

      2. Type: cd path_copied/platform-tools

      3. Type: adb help

      4. Verify that it works.

    2. For Mac:

      1. Open terminal

      2. Navigate to the directory: ~/Library/Android/sdk/platform-tools/

      3. Type: adb help

      4. Verify that it works.

    3. For Linux:

      1. Perform the same command for the default directory in ~/Android/Sdk/platform-tools/adb or a Terminal type whereis adb and look for the directory