Android Studio


Android Studio is an IDE developed by Google, built on JetBrains’ IntelliJ IDEA software and designed specifically for Android development.
https://developer.android.com/studio

Table of contents

  1. IDE
    1. macOS
    2. Windows
  2. SDK
  3. Emulator
  4. Android Home
    1. macOS
    2. Windows

πŸ”² β†’ Optional
βœ… β†’ Required
πŸ”˜ β†’ Pick One
ℹ️ β†’ Information


IDE


macOS

βœ… Installation

  1. Visit https://developer.android.com/studio
  2. Click Download Android Studio Xxx
  3. Select I have read and agree with the above terms and conditions
  4. Click Mac with Intel chip or Mac with Apple chip
  5. Open android-studio-xxx.x.x-mac.dmg in Downloads
  6. Drag Android Studio to the Applications

Windows

βœ… Installation

πŸ”˜ Chocolatey

choco install androidstudio

Open Command Prompt with administrator privileges

πŸ”˜ Setup Wizard

  1. Visit https://developer.android.com/studio
  2. Click Download Android Studio Xxx
  3. Check I have read and agree with the above terms and conditions
  4. Click Download Android Studio Xxx | xxxx.x.x for Windows
  5. Open android-studio-xxx.x.x-windows.exe in Downloads
  6. Do installation procedures of Setup Wizard

SDK


βœ… Installation

πŸ”˜ Setup Wizard

When opening for the first time after installed Android Studio.

  1. Open Android Studio
  2. Welcome > Next
  3. Install Type > Next
  4. Verify Settings > Next
  5. License Agreement > Accept licenses > Finish
  6. Downloading Components > Finish

πŸ”˜ Download

When missing Android SDK Components. That means, you have NOT installed environment yet as above.

βœ… SDK Manager

  1. Open Android Studio
  2. Open Settings
    Navigation route: More Actions > SDK Manager

βœ… Settings

βœ… SDK Platforms

β˜‘ Show Package Details
β˜‘ Android XX.X
Β Β Β  β˜‘ Android SDK Platform XX
Β Β Β  β˜‘ Sources for Android XX

βœ… SDK Tools

β˜‘ Show Package Details
β˜‘ Android SDK Build-Tools XX
Β Β Β  β˜‘ XX.0.0
β˜‘ Android Emulator
β˜‘ Android SDK Platform-Tools

Emulator


βœ… Creating

βœ… Virtual Device Manager

  1. Open Android Studio
  2. Open Device Manager
    Navigation route: More Actions > Virtual Device Manager

βœ… Virtual Device Configuration

  1. Create Virtual Device
  2. Select Device > Next
  3. Download System Image: Click Download icon
  4. Agree License: Accept > Next
  5. Complete Requested Actions: Finish
  6. Select System Image > Next
  7. Verify Configuration > Finish
  8. Verify Virtual Devices

Android Home


macOS

βœ… Setting

By default, SDK location is /Users/{USER}/Library/Android/sdk.
The environment variables that need to be set in the following:

  • ANDROID_HOME
  • Tools:
    • Platform Tools: adb
    • Build Tools: apksigner
    • Command-Line Tools: avdmanager, sdkmanager, apkanalyzer
    • Emulator: emulator, mksdcard
echo "export ANDROID_HOME=/Users/{USER}/Library/Android/sdk" >> ~/.zshrc
echo "export PATH=\$PATH:\$ANDROID_HOME/platform-tools" >> ~/.zshrc
echo "export PATH=\$PATH:\$ANDROID_HOME/build-tools/{API_LEVEL}" >> ~/.zshrc
echo "export PATH=\$PATH:\$ANDROID_HOME/cmdline-tools/{CMD_TOOLS_VERSION}/bin" >> ~/.zshrc
echo "export PATH=\$PATH:\$ANDROID_HOME/emulator" >> ~/.zshrc

β˜‘ Replace {USER} by your current username
β˜‘ Replace {API_LEVEL} (E.g. 34.0.0)
β˜‘ Replace {CMD_TOOLS_VERSION} (E.g. 13.0)


πŸ”² Validation

source ~/.zshrc
echo $ANDROID_HOME
adb --version

Windows

βœ… Setting

By default, SDK location is C:\Users\{USER}\AppData\Local\sdk.
The environment variables that need to be set in the following:

  • ANDROID_HOME
  • Tools:
    • Platform Tools: adb
    • Build Tools: apksigner
    • Command-Line Tools: avdmanager, sdkmanager, apkanalyzer
    • Emulator: emulator, mksdcard
setx /m ANDROID_HOME "C:\Users\{USER}\AppData\Local\sdk" & refreshenv
setx /m PATH "%PATH%;%ANDROID_HOME%\platform-tools" & refreshenv
setx /m PATH "%PATH%;%ANDROID_HOME%\build-tools\{API_LEVEL}" & refreshenv
setx /m PATH "%PATH%;%ANDROID_HOME%\cmdline-tools\{CMD_TOOLS_VERSION}\bin" & refreshenv
setx /m PATH "%PATH%;%ANDROID_HOME%\emulator" & refreshenv

β˜‘ Open Command Prompt with administrator privileges
β˜‘ Replace {USER} by your current username
β˜‘ Replace {API_LEVEL} (E.g. 34.0.0)
β˜‘ Replace {CMD_TOOLS_VERSION} (E.g. 13.0)


πŸ”² Validation

echo %ANDROID_HOME%
adb --version