Flutter installation

This is a summary of what this YouTube video explains. Recommended. Youtube - Install Flutter macOS - Derek Banas

1. Install Flutter

brew install --cask flutter
flutter doctor
flutter upgrade

2. Optional: Install Android Studio

Install Android studio if you plan to target Android devices.
Download latest Android Studio from https://developer.android.com/studio and install Flutter plugin
Settings > Plugins > Flutter In Settings > System Settings
  • In SDK Platforms tab, make sure at least one API level is installed. This is needed for running apps.
  • In SDK Tools tab, make sure Android SDK Command Line Tools (latest) is installed. This is needed by flutter.
  • Set ANDROID_HOME Get your Android sdk location from Android Studio
    echo export ANDROID_HOME="/Users/ignacio/Library/Android/sdk" >> ~/.zshrc
    If needed, restart terminal to get settings applied.
In recent versions of Android Studio jre directory has been renamed to jbr so Flutter gets confused. To solve this we create a link. (Thanks to this Stackoverflow answer!)
cd /Applications/Android\ Studio.app/Contents
ln -s jbr jre
Now Flutter show be able to fully recognize Android, we run the doctor:
flutter doctor -v
flutter doctor --android-licenses
Last step on Android Studio: The first time we create a Flutter project we need to setup Flutter SDK path. We get it from flutter doctor -v command. Just look for a line like this:
• Flutter version 3.7.1 on channel stable at /opt/homebrew/Caskroom/flutter/3.7.0/flutter

3. Optional: Install CocoaPods

I suspect this is only required if you target iOS devices.
brew install cocoapods

4. Final check

At the end we should have everything setup. Run the doctor:
flutter doctor -v

0 comments :

This work is licensed under BSD Zero Clause License | nacho4d ®