Skip to content

Instantly share code, notes, and snippets.

@ThePredators
Last active April 9, 2024 21:43
Show Gist options
  • Star 77 You must be signed in to star a gist
  • Fork 11 You must be signed in to fork a gist
  • Save ThePredators/064c46403290a6823e03be833a2a3c21 to your computer and use it in GitHub Desktop.
Save ThePredators/064c46403290a6823e03be833a2a3c21 to your computer and use it in GitHub Desktop.
Setup Mobile Development Environment

⭐ Setup Mobile Development Environment

⚠️ The following configuration has been tested on Intel, M1 & M2 Ships ⚠️

Pre-requisit :

If you have any issues with macOS, or need anything related to it check this documentation

Install Xcode Command Line tools :

xcode-select --install

Intel Chips

Nothing else to do.

ARM Chips

Install Rosetta :

/usr/sbin/softwareupdate --install-rosetta --agree-to-license

Install FFI

arch -x86_64 sudo gem install ffi

Part 1 : Install Tools

Install HomeBrew

## Install Brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

If you need to remove it, to make a clean install

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"

Add HomeBrew to Your Path

HBP=`brew --prefix`
export PATH=$HBP/bin:$PATH

Apple M1 Support

To install Homebrew on M1 Apple :

arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Add this alias to .zshrc

alias brew="arch -arm64 brew" # M2 x86_64

Apple M2 Support

For M2 apparently using "-arm64" doesn't work anymore !

Add this alias to .zshrc

alias brew="arch -x86_64 brew"

Usefull CLI

## Check that everything is Ok
brew doctor
## To update HomeBrew
brew update
## To update/upgrade a brew package just run :
brew reinstall PACKAGE_NAME

Install iTerm

brew install --cask iterm2

Install ZSH

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

🔆 Configure Zsh in a clever way

Clone the following repository and follow the described steps zshconfig

(The above tool is fully automated and available for Intel & M1 Mac)

Install PowerLvl Template + Zsh Plugins

## Install Power10k :
git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k

### change ZSH_THEME to : ZSH_THEME="powerlevel10k/powerlevel10k"
### then run :
p10k configure

## Install Auto-Suggestion :
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
### Edit .zshrc & add in plugins array : zsh-autosuggestions

## Install Syntaxe Hylight :
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
### Edit .zshrc & add in plugins array : zsh-syntax-highlighting

## Install Completion : 
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions
### Edit .zshrc & add this line before source $ZSH/oh-my-zsh.sh
#### fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src

## Install History substring :
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
### Edit .zshrc & add this line before source $ZSH/oh-my-zsh.sh
#### fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-history-substring-search/src

Don't forget to import Meslo Font into iTerm -> Preferences -> Profiles -> "Selected Profile" -> Text -> Font -> Select the Meslo font you want to use.

My P10k config Options :

- Rainbow
- Unicode
- 24H
- Flat
- Flat
- 2 lines
- Dotted
- Right
- Darkest
- Sparse
- Concise
- No
- Verbose
- Overright
- No (.zshrc)

Install SVN

brew install subversion

Install Repo

brew install repo

Install Git

brew install git
brew install git-lfs

Install Git Flow

brew install git-flow

Install Sublime Text

brew install --cask sublime-text
brew install --cask fork

Install PowerLine Fonts for iTerm (Optionnal) :

# clone
git clone https://github.com/powerline/fonts.git --depth=1

# install
cd fonts && ./install.sh

# clean-up a bit
cd .. && rm -rf fonts

Install VsCode

brew install --cask visual-studio-code

How to use iTerm + PowerLvl10k in Vscode :

(I assume here you already followed steps decribed in section Install ZSH)

Edit this Vscode User Settings file /Users/$(whoami)/Library/Application\ Support/Code/User/settings.json and add the following :

{
    "terminal.external.osxExec": "iTerm.app",
    "terminal.integrated.shell.osx": "/bin/zsh",
    "terminal.integrated.fontFamily": "'MesloLGS NF'",
    "terminal.integrated.cursorStyle": "line",
    "terminal.integrated.lineHeight": 1.3
}

Install VirtualBox

brew install --cask virtualbox

Install Docker + Kitematic

Install Docker

Intel Support

brew install docker

M1 Support Download this docker M1 image Docker Desktop Apple M1

Install Kitematic

brew install --cask kitematic

Install some macOS developer Tools

OpenInTerminal

brew install --cask openinterminal

Spectacle

brew install --cask spectacle

Dozer

brew install --cask dozer

DB Browser for SQLite

brew install --cask db-browser-for-sqlite

Proxyman

brew install --cask proxyman

PostMan

brew install --cask postman

Install Browser Plugins :

Chrome :

FireFox :

Part 2 : Install iOS

Install Ruby

curl -L https://get.rvm.io | bash -s stable
echo $"\nsource /Users/$(whoami)/.rvm/scripts/rvm\n" >> /Users/$(whoami)/.zshrc # or .bashrc
rvm install ruby-3.2.2
rvm use ruby-3.2.2
rvm --default use 3.2.2

M1 Support

Add the following to your .zshrc

alias gem="arch -x86_64 sudo gem"

Please run the following scripts too !

gem install --user-install ffi -- --enable-libffi-alloc

Install Bundler

gem install bundler

Install CocoaPods :

sudo gem install cocoapods -n /usr/local/bin

M1 Support

Add this to .zshrc

alias pod="arch -arm64 pod"

No Need to install on macOS ! Don't forget to check the SPM Aliases !

Install XCode

Many options to download Xcode you can use the following

Recommended Using : Xcodes

# Install xcodes
brew install robotsandpencils/made/xcodes

# list available xcode versions
xcodes list

# Update available xcode versions
xcodes update

# Install Aria2 "For Fast download"
brew install aria2

# Install XCode (ex. Xcode 13 Beta 5)
xcodes install 14.3

Before running xcodes, export this environment variables :

export XCODES_USERNAME="<your_email>"
export XCODES_PASSWORD="<your_pass>"

Others :

Install Runtimes :

Using again Xcodes tool from above

List Runtimes

xcodes runtimes --include-betas

Install iOS Runtime

xcodes runtimes install "iOS 17.0-beta1"

Install iOS Simulator :

Install xcode-install

sudo gem install xcode-install

Display all simulators By name

xcversion simulators

Install a Simulator

xcversion simulators --install="iOS 14.4 Simulator"

Display all availables devices and simulators ByIds

xcrun simctl list

Output Example :

D9C60396-FC76-4693-AEE2-84AA7C8EB200 (active, disconnected)
    Watch: Apple Watch Series 6 - 44mm (FE1A98F8-C2F2-446D-B436-B484B1D87837) (Shutdown)
    Phone: iPhone 12 Pro Max (7395B23C-9AAE-4CEB-8FCC-82A70FCE0553) (Shutdown)

Open Simualtor/Device ById

I advice to add this alias to your config :

alias sim="/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator -CurrentDeviceUDID"

Then just run :

sim D9C60396-FC76-4693-AEE2-84AA7C8EB200

(ex. From above the DeviceUDID is : D9C60396-FC76-4693-AEE2-84AA7C8EB200)

To Open latest iOS Simulator

open -a Simulator

Install Fastlane

gem install fastlane -NV

then run :

bundle update
bundle install
bundle exec fastlane ...

Sometimes a write issue appear using bundle install/update to fix it do this :

sudo chown -R $(whoami) /Users/$(whoami)/.gem

More details

Part 3 : Install Android

Install Java JDK :

Using Jabba "Java Version Manager" (Recommanded)

# Install Jabba 
echo $'\nexport JABBA_VERSION="0.11.2"\n' >> /Users/$(whoami)/.zshrc
curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh

# Verify this line is in .zshrc (Should be added automatically)
[ -s "/Users/$(whoami)/.jabba/jabba.sh" ] && source "/Users/$(whoami)/.jabba/jabba.sh"

# List available java versions
jabba ls-remote

# Install JDK 16
jabba install openjdk@1.16.0

# Verify java version
java -version

## The result should be : 
# openjdk 16.0.1 2021-04-20
# OpenJDK Runtime Environment (build 16.0.1+9-24)
# OpenJDK 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)

# Switch to a different Java version (need to first be installed using Jabba)
jabba use ...

# Don't forget to export JAVA_HOME
echo $"\nexport JAVA_HOME=/Users/$(whoami)/.jabba/jdk/openjdk@1.16.0/Contents/Home\n" >> /Users/$(whoami)/.zshrc
echo $"\nexport PATH=$JAVA_HOME:$PATH\n" >> /Users/$(whoami)/.zshrc

Old way :

brew tap adoptopenjdk/openjdk
brew install --cask adoptopenjdk8
echo $"\nexport JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/\n" >> /Users/$(whoami)/.zshrc
echo $"\nexport PATH=$JAVA_HOME:$PATH\n" >> /Users/$(whoami)/.zshrc

Install Gradle

brew install gradle
## Reinstall Gradle to Latest Version
echo $"\nexport GRADLE_VERSION=$(echo $(arr=($(gradle --version | awk '{ print $2 }')) && echo ${arr[1]}))\n" >> /Users/$(whoami)/.zshrc
echo $"\nexport GRADLE_HOME=`brew --prefix`/Cellar/gradle/$GRADLE_VERSION\n" >> /Users/$(whoami)/.zshrc
echo $"\nexport PATH=$GRADLE_HOME/bin:$PATH\n" >> /Users/$(whoami)/.zshrc

Install Android "SDK + NDK"

Install Android SDK (sdkmanager, avdmanager, lint, retrace, screenshot2, apkanalyzer)

## Since android-sdk is deprecated
brew install --cask android-commandlinetools

# Export some paths
echo $"\nexport ANDROID_HOME=`brew --prefix`/share/android-commandlinetools\n" >> /Users/$(whoami)/.zshrc
echo $"\nexport PATH=$ANDROID_HOME:$PATH\n" >> /Users/$(whoami)/.zshrc

echo $"\nexport SDK_MANAGER=`brew --prefix`/bin/sdkmanager\n" >> /Users/$(whoami)/.zshrc
echo $"\nexport PATH=$SDK_MANAGER:$PATH\n" >> /Users/$(whoami)/.zshrc

echo $"\nexport AVD=`brew --prefix`/bin/avdmanager\n" >> /Users/$(whoami)/.zshrc
echo $"\nexport PATH=$AVD:$PATH\n" >> /Users/$(whoami)/.zshrc

# Then Accept all licenses
yes | sdkmanager --licenses

# Then Install Tools
sdkmanager "cmdline-tools;latest" "patcher;v4" "build-tools;30.0.2" "platforms;android-32" "emulator" "tools" "platform-tools"

Install Android NDK

sdkmanager "ndk-bundle"

Install (ADB, fastboot, sload_f2fs, dmtracedump, e2fsdroid, etc1tool, hprof-conv, make_f2fs, make_f2fs_casefold, mke2fs)

brew install android-platform-tools

echo $"\nexport ADB=`brew --prefix`/bin/adb\n" >> /Users/$(whoami)/.zshrc
echo $"\nexport PATH=$ADB:$PATH\n" >> /Users/$(whoami)/.zshrc

More Infos :

Install Android studio

Install Android studio

brew install --cask android-studio

Install Android Emulator

GenyMotion (Recomended for Intel)

brew install --cask genymotion

Usefull ClI :

## Copy this to .zshrc
echo 'GMTOOL_PATH="/Applications/Genymotion.app/Contents/MacOS/"' >> /Users/$(whoami)/.zshrc
echo 'export PATH=$GMTOOL_PATH:$PATH' >> /Users/$(whoami)/.zshrc

## Display devices list
genyshell -c "devices list"

## To Create / run u need licence !
## Create a device
gmtool admin create "Google Pixel - 9.0 - API 28 - 1080x1920" GP_9

## Run a device
gmtool admin run GP_9

Android Emulator - Apple M1

Download this emulator Apple M1

⚠️ For Apple Silicon genymotion is not available since they do not yet support VirtualBox version 7 ⚠️

Install Android File Transfer : (Optionnal)

Best tool so far OpenMtp: better than Google AFT

brew install --cask openmtp

Install Android Debug Tool : (Optionnal)

Best for anything : Scrcpy (Recomended) (Vysor + Android File Transfer alternative)

brew install scrcpy

Part 4 : Install Flutter

## Install Flutter
## Dart & Dart SDK will be inside : bin/ & bin/cache
brew install --cask flutter

## Migrate to null safety (Only inside a project)
# dart migrate --apply-changes

## Check That everythong is OK
flutter doctor -v

Add theses lines to .zshrc

FLUTTER_VERSION=$(echo $(arr=($(flutter --version | awk '{ print $2 }')) && echo ${arr[1]}))
export FLUTTER_SDK=`brew --prefix`/Caskroom/flutter/$FLUTTER_VERSION/flutter
export PATH=$PATH:$FLUTTER_SDK

## Flutter cache
PUB_CACHE_BIN=$HOME/.pub-cache/bin
export PATH=$PATH:$PUB_CACHE_BIN

## Dart Path
DART_PATH=$FLUTTER_SDK/bin/dart
export PATH=$PATH:$DART_PATH

## Export DART SDK Path
export DART_SDK=$FLUTTER_SDK/bin/cache/dart-sdk

Link "Android SDK, Flutter SDK, Dart SDK, JDK" to Android Studio

In case export environment variable doesn't work properly with Android Studio, follow theses steps.

Link Android SDK :

Option 1 : In case the following command didn't work, follow the bellow steps.

flutter config --android-sdk $ANDROID_HOME

Options 2 :

  1. create a symbolic link to Android SDK :
ln -s $ANDROID_HOME
  1. call the link you created from (Preference -> Appearance & Behaviour -> System Settings -> Android SDK)
Link Dart SDK :
  1. create a symbolic link to Dart SDK :
ln -s $DART_SDK
  1. call the link you created from (Preference -> Languages & Frameworks -> Dart)
Link Flutter SDK :
  1. create a symbolic link to Flutter SDK :
ln -s $FLUTTER_SDK
  1. call the link you created from (Preference -> Languages & Frameworks -> Flutter)
Link Java JDK :

Make sure that exported JAVA_HOME was not read in Android Studio Correctly. Go to (Right Click on your project -> Platform Settings -> SDKs).

If not :

  1. create a symbolic link to Java JDK :
ln -s $JAVA_HOME
  1. call the link you created

Result :

If everything was all good you should get something like this :

❯ flutter doctor -v                                                          ─╯
[] Flutter (Channel stable, 3.10.2, on macOS 13.4 22F66 darwin-arm64 (Rosetta),
    locale en-BE)
    • Flutter version 3.10.2 on channel stable at
      /usr/local/Caskroom/flutter/3.10.2/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 9cd3d0d9ff (3 days ago), 2023-05-23 20:57:28 -0700
    • Engine revision 90fa3ae28f
    • Dart version 3.0.2
    • DevTools version 2.23.1

[] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /usr/local/share/android-commandlinetools
    • Platform android-32, build-tools 30.0.2
    • ANDROID_HOME = /usr/local/share/android-commandlinetools
    • ANDROID_SDK_ROOT = /usr/local/share/android-commandlinetools
    • Java binary at: /Applications/Android
      Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode-14.3.0.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.12.1

[] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[] Android Studio (version 2022.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      17.0.6+0-17.0.6b802.4-9586694)

[] VS Code (version 1.78.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 13.4 22F66 darwin-arm64
      (Rosetta)
    • Chrome (web)    • chrome • web-javascript • Google Chrome 113.0.5672.126

[] Network resources
    • All expected network resources are available.

• No issues found!

FAQ :

Install Rosetta 2

softwareupdate --install-rosetta

Dart SDK Install issues

  • Update them from Software Update in System Preferences or run:**
softwareupdate --all --install --force
  • If that doesn't show you any updates, run :
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install

You're good to go !

@narcis-ro
Copy link

Very nice! Thank you!

@trulytrojan
Copy link

great guide! installed it with sudo. now I get permission denied when run gradle etc as a regular different user. Any thoughts?

@ThePredators
Copy link
Author

great guide! installed it with sudo. now I get permission denied when run gradle etc as a regular different user. Any thoughts?

Which part of tutos and which command please?

@ThePredators
Copy link
Author

ThePredators commented Aug 25, 2021

MAJ 08/2021 :

  • Apple M1 Support added for --> Homebrew, CocoaPods, Flutter, Docker, Android Emulator, Ruby "Gems"
  • Added Zshconfig repository for better integration of zsh --> https://github.com/ThePredators/zshconfig
  • Aliases can be found in ZshConfig repos
  • SPM section (Swift Package Manager) Added
  • Xcode install section Updated
  • iOS Simulator section Updated
  • Ruby section updated (added some config for Apple M1 Users)

@ThePredators
Copy link
Author

ThePredators commented Sep 27, 2021

MAJ 09/2021 :

  • Added a Section on how to install Fastlane and how to integrate it for Android/iOS/Flutter with Testflight & AppCenter

@farmisen
Copy link

@ThePredators adoptopenjdk8 is discontinued and the java section should be the following:

# Java
brew tap homebrew/cask-versions
brew install --cask temurin8
echo $"\nexport JAVA_HOME=/Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home/\n" >> /Users/$(whoami)/.zshrc

@farmisen
Copy link

farmisen commented Oct 30, 2021

another option to install Java:

Install SDKMAN!

curl -s "https://get.sdkman.io" | bash 
. "$HOME/.sdkman/bin/sdkman-init.sh"

Java with SDKMAN!

sdk install java 8.0.302-tem

@farmisen
Copy link

also android-sdk location is somewhere else on my machine:
export ANDROID_HOME=/usr/local/opt/android-sdk

@farmisen
Copy link

this snippet is to install the android ndk:

Install Android NDK

brew install --cask android-ndk
echo $"\nexport ANDROID_NDK_HOME="/usr/local/share/android-ndk\n" >> /Users/$(whoami)/.zshrc

@ThePredators
Copy link
Author

this snippet is to install the android ndk:

Install Android NDK

brew install --cask android-ndk
echo $"\nexport ANDROID_NDK_HOME="/usr/local/share/android-ndk\n" >> /Users/$(whoami)/.zshrc

Nice share dude for all of this, i will try it and update the documentation.
Thanks a lot 👍

@ChristopherA
Copy link

Installing brew will now install command line utilities if needed, and do so non-interactively, so is superior to doing it yourself before installing brew.

@ThePredators
Copy link
Author

ThePredators commented Nov 21, 2021

MAJ 11/2021 :

  • Java Section Updated to meet JDK 17 LTS
  • Install Android NDK with sdkmanager
  • Updated a Vscode section on How to use VsCode + iTerm + Powerlvl10k fonts

@ThePredators
Copy link
Author

MAJ 12/2021:

  • Android Section updated (Since some tools are deprecated !)
  • Java section Updated (Do not use JDK 17 with Android Studio it may cause some issues regarding a removed jvm argument, use JDK 16 !)

@ThePredators
Copy link
Author

MAJ 01/2022 :

  • Android & Flutter section updated.

@ThePredators
Copy link
Author

ThePredators commented Mar 1, 2022

MAJ 03/2022 :

  • Flutter Section and HomeBrew Section updated.
  • Android Studio Section updated to fix issues with "Flutter, Dart, and Android SDK"

@ThePredators
Copy link
Author

MAJ 01/2023 :

  • Android Emulator Section updated (GenyMotion deprecated for Apple Silicon macbooks)

@yvza
Copy link

yvza commented May 19, 2023

React Native setup work well, tested on m2 pro 🚀

@ThePredators
Copy link
Author

Update 05/2023 :

  • Updated the overall documentation
  • Updated Homebrew section for M2 (strange behaviour)

@ThePredators
Copy link
Author

ThePredators commented Jun 13, 2023

Update 06/2023 :

  • Added a way to download iOS, TV, WatchOS Runtimes using xcodes tool.

@josephbhunt
Copy link

josephbhunt commented Nov 29, 2023

Here are a few things I noticed while using this install guide.

This line should have \nexport not \nnexport (extra "n")

echo $'\nnexport JABBA_VERSION="0.11.2"\n' >> /Users/$(whoami)/.zshrc

I'm using a mac M2 and I did not need to X86_64 alias for brew. It caused an error when trying to install brew install gradel

When I copy paste commands like echo $"\nexport PATH=$GRADLE_HOME/bin:$PATH\n" >> /Users/$(whoami)/.zshrc
they write the "$" to the ~/.zshrc file. Like so,

$
export GRADLE_HOME=/opt/homebrew/Cellar/gradle/

This line is missing export. echo $"\nGRADLE_VERSION=$(echo $(arr=($(gradle --version | awk '{ print $2 }')) && echo ${arr[1]}))\n" >> /Users/$(whoami)/.zshrc

should be echo $"\nexport GRADLE_VERSION=$(echo $(arr=($(gradle --version | awk '{ print $2 }')) && echo ${arr[1]}))\n" >> /Users/$(whoami)/.zshrc

I had to install openjdk@1.17.0 to get the latest version of sdkmanager to work.

This line didn't work because patcher;v4 does not exist. I had to remove that package and just install the rest.
sdkmanager "cmdline-tools;latest" "patcher;v4" "build-tools;30.0.2" "platforms;android-32" "emulator" "tools" "platform-tools"

@ThePredators
Copy link
Author

Here are a few things I noticed while using this install guide.

This line should have \nexport not \nnexport (extra "n")

echo $'\nnexport JABBA_VERSION="0.11.2"\n' >> /Users/$(whoami)/.zshrc

I'm using a mac M2 and I did not need to X86_64 alias for brew. It caused an error when trying to install brew install gradel

When I copy paste commands like echo $"\nexport PATH=$GRADLE_HOME/bin:$PATH\n" >> /Users/$(whoami)/.zshrc they write the "$" to the ~/.zshrc file. Like so,

$
export GRADLE_HOME=/opt/homebrew/Cellar/gradle/

This line is missing export. echo $"\nGRADLE_VERSION=$(echo $(arr=($(gradle --version | awk '{ print $2 }')) && echo ${arr[1]}))\n" >> /Users/$(whoami)/.zshrc

should be echo $"\nexport GRADLE_VERSION=$(echo $(arr=($(gradle --version | awk '{ print $2 }')) && echo ${arr[1]}))\n" >> /Users/$(whoami)/.zshrc

I had to install openjdk@1.17.0 to get the latest version of sdkmanager to work.

This line didn't work because patcher;v4 does not exist. I had to remove that package and just install the rest. sdkmanager "cmdline-tools;latest" "patcher;v4" "build-tools;30.0.2" "platforms;android-32" "emulator" "tools" "platform-tools"

Thanks for your message i will update the guide accordingly.

On M1 they were some issues related to usage of brew with prefix, but i confirm from M2 and more you should use :
alias brew="arch -arm64 brew"

@ThePredators
Copy link
Author

Update 01/2024 :

  • Updated section Android

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment