Skip to content

Instantly share code, notes, and snippets.

@domhel
Created August 31, 2024 08:02
Show Gist options
  • Select an option

  • Save domhel/395d97f79e092a1aa3b1d4b8fa4d1ea1 to your computer and use it in GitHub Desktop.

Select an option

Save domhel/395d97f79e092a1aa3b1d4b8fa4d1ea1 to your computer and use it in GitHub Desktop.
Build Flutter Android applications on MacOS
# Prerequisites: flutter, homebrew
# Install Java
brew install --cask temurin@17
# Install android commandline tools
brew install --cask android-commandlinetools
# Put the following into ~/.bashrc or ~/.zshrc (don't execute)
export PATH=$PATH:/opt/homebrew/share/android-commandlinetools
# Not sure if the following command is necessary
flutter config --android-sdk /opt/homebrew/share/android-commandlinetools
# Install sdk (35 works with Flutter 3.24)
sdkmanager "platform-tools" "platforms;android-35" "build-tools;35.0.0"
# Accept licenses
flutter doctor --android-licenses
# That's it, now run
flutter doctor --verbose
# and start building
flutter build apk
flutter build appbundle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment