Install Android Studio on MacBook Pro M1 Pro, M1 Max, MacBook Air-pro M2

EternalCoders
2 min readAug 19, 2022

--

Installing Android Studio in Apple Silicon MacBooks is still tricky. Here’s a simplified guide how you can install Android Studio and setup environment for working in Android Studio.

This guide be used for installing Android Studio on MacBook Air M1 2020, MacBook Pro M1 2020, MacBook Pro M1 Pro 2021, MacBook Pro M1 Max 2021.

Install Homebrew

  1. Open terminal and run the command
/bin/bash -c "$(curl -fsSL <https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh>)"

2. Set path for Homebrew

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/username/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

Install JAVA

for Intel Macs x86 Architecture

  1. Install Rosetta 2
sudo softwareupdate --install-rosetta

2. Install JAVA using Homebrew

brew tap adoptopenjdk/openjdkbrew cask install adoptopenjdk8

(OPTIONAL) if above command does not works try this command brew install --cask adoptopenjdk8

for Apple Silicon M1 / M1 Pro / M1 Max

Download & Install Azul Zulu OpenJDK8 for ARM Processors

Link: https://www.azul.com/downloads/?version=java-8-lts&os=macos&architecture=arm-64-bit&package=jdk

DMG Link: https://cdn.azul.com/zulu/bin/zulu8.58.0.13-ca-jdk8.0.312-macosx_aarch64.dmg

Set JAVA_HOME path permanently in macOS

  1. Open terminal
nano ~/.zshrc

2. enter the path

export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home
export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home

3. Press Control + X to save

4. Press Y to confirm

5. Press Return / Enter

6. enter command to fetch the latest paths

source ~/.zshrc

7. to check if JAVA_HOME is configured properly, enter

echo $JAVA_HOME

Install Android Studio

Latest version of the Android Studio has some errors, so we recommend installing an archive version that works well in the Apple Silicon MacBooks.

Get to the archives and download the version released on 28th July 2021

Link: https://developer.android.com/studio/archive

Direct Download Link: https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2020.3.1.22/android-studio-2020.3.1.22-mac_arm.zip

--

--