Docly Child

How to Setup Flutter in Android Studio – macOS

Estimated reading: 2 minutes 15 views

Download Android Studio and XCode

Step 1 : Get the Flutter SDK

  1. Download the latest stable release of the Flutter SDK.
  2. Extract the downloaded SDK at desired location(i.e – documents/flutter). You can double tap on zip and it will be extracted.

Step 2 : Update your path

Important:

Path variable needs to be updated to access “flutter” command from terminal. you can just update path variable for current terminal window only. and if you want to access flutter commands from anywhere in terminal, you have to update SDK path permanently.

To update PATH variable for current terminal window only run command below and press Enter key.

export PATH="$PATH:`pwd`/flutter/bin

To update PATH variable permanently, you have to update .bash_profile. Enter command below in terminal.

sudo open -e $HOME/.bash_profile

Append below line to bash_profile file at bottom of all other content.

export PATH="$PATH:[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin

Replace [PATH_TO_FLUTTER_DIRECTORY] with the actual path where you extracted Flutter.

Run the command below to refresh .bash_profile.

source $HOME/.bash_profile

You are now ready to run Flutter commands in the Flutter Console!

Run “flutter doctor” Or “flutter doctor -v” into terminal, If you are getting check list of Flutter SDK requirements, it means SDK is successfully installed on your machine and you can start building flutter apps on your machine.

If you find any issue during environment setup in macOS, please go online Click here

Leave a Comment

Share this Doc
CONTENTS