This repository was archived by the owner on Nov 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
macOS Java Android dev setup (Android Studio, Intellij Community Edition, etc.)
Michael Hulse edited this page Jul 18, 2019
·
5 revisions
I have noticed that the brew cask installation does not install the most recent versions of the apps; I have since uninstalled the cask versions and just downloaded the dmg installers from their respective download pages.
$ brew cask install android-sdk
$ brew cask install android-ndkUpdate your environment variables (add this to your .bash_profile):
export ANDROID_NDK_HOME=/usr/local/share/android-ndk
export ANDROID_SDK_ROOT=/usr/local/share/android-sdkReload your profile:
$ source "$HOME/.bash_profile"Accept licenses:
$ yes | sdkmanager --licensesInstall all of the Android SDK components:
$ sdkmanager --update
Warning: File /Users/mhulse/.android/repositories.cfg could not be loaded.
[=======================================] 100% Computing updates...Note: I think you can ignore the warning.
Occasionally run:
$ brew doctor
$ brew update
# Update all installed packages to the latest version:
$ sdkmanager --updateLastly, install Eclipse, IntelliJ, Android Studio, or your other favorite IDE.
If you are feeling adventurous, install Android Studio using Homebrew as a cask:
$ brew cask install android-studio
# IntelliJ Community Edition (free):
$ brew cask install intellij-idea-ce
# IntelliJ Pro (paid):
# $ brew cask install intellij-ideaFor brew casks, occasionally run:
brew cask outdated | xargs brew cask reinstallOptimal brew commands to update everything (including casks):
$ brew doctor && brew update && brew upgrade && brew cask outdated | xargs brew cask reinstall && sdkmanager --update && brew cleanup && brew prune && brew doctor