DEV Community

Cover image for How to install Flutter on a MacBook
Julia 👩🏻‍💻 GDE
Julia 👩🏻‍💻 GDE

Posted on

71

How to install Flutter on a MacBook

I'm going to use Flutter for the first time and dive into the world of mobile development 📱.

(As usual) I had some issues installing Flutter on my MacBook 🙄. So I reset my MacBook, which was long overdue, and set up the technical environment from scratch, using the package manager from the beginning.

And I'm glad I did. Finally the installations are running smooth as butter 🧈.

Environment

Device Chip Operation System CommandLine Tool
MacBook Air Apple M1 macOS Sonoma 14.1.2 HomeBrew

Installation process

After installing Flutter, by running the command

brew install --cask flutter,

everything worked smoothly. I then run

flutter doctor,

which provided instruction on how to move further.

Console output showing instructions on how to install flutter

Here are the commands I ran:

  • sudo softwareupdate --install-rosetta --agree-to-license

  • brew install --cask android-studio

  • sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

  • sudo xcodebuild -runFirstLaunch

  • brew install cocoapods

  • xcodebuild -downloadPlatform iOS

  • path/to/sdkmanager --install "cmdline-tools;latest"

  • flutter doctor --android-licenses

  • flutter config --android-sdk

Now, when running flutter doctor again, everything is setup.

Successful installation of Flutter.

Tip 💡: In case you have problems with Android toolchain - develop for Android devices and the error cmdline-tools component is missing, check out my article about Android cmdline tools component is missing - Flutter Installation


Thanks for your reading and time. I really appreciate it.

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (2)

Collapse
 
damuz91 profile image
David Muñoz

Instead of:
path/to/sdkmanager --install "cmdline-tools;latest"
I had to go to Android Studio -> Tools -> SDK Manager -> SDK Tools and check Android SDK Command-line Tools
Then after running brew doctor I just missed to accept the terms which its done via
flutter doctor --android-licenses

Collapse
 
ral_cabrera_eb4ef4908d86 profile image
Raúl Cabrera

Thanks, this was really helpful!

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay