Created
August 31, 2024 08:02
-
-
Save domhel/395d97f79e092a1aa3b1d4b8fa4d1ea1 to your computer and use it in GitHub Desktop.
Build Flutter Android applications on MacOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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