Flutter Installation on MacOs Catalina
This is a guide on how to set up and install Flutter on MacOs Catalina.
System Requirements:
Operating Systems: macOS (64-bit)
Disk Space: 2.8 GB (does not include disk space for IDE/tools).
Tools: bash, curl, git 2.x, mkdir, rm, unzip, which, zip
download Flutter from https://flutter.dev/docs/get-started/install/macos
Unzip the folder
for the following steps please turn on the path bar ( finder->view-> show path bar/ option+ cmd+p)
go to Users/YourUsername and create a new folder called “Dev” for example
copy the unzipped Flutter folder to the new “Dev” folder
open Spotlight (cmd+ spacebar) and search “terminal”,click enter to open it
open the terminal and go to the preferences cmd+ ,
change Shells open with to /bin/zsh
I use the Homebrew profile, to have a better contrast
open the terminal, type: vim~/ .zshrc (enter)
open the flutter website, and copy the following line:
export PATH=”$PATH[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin”
Open the terminal window and type “i” to edit and insert a new line
delete everything in […..] -> export PATH=”$PATH: …/flutter/bin”
we have extracted the flutter folder into the Users/Username/Dev folder before
now open the terminal and point to the flutter/bin folder -> $Home/Dev/flutter/bin
hit the Esc key, and type: wq!
close the current terminal window, and create a new one (cmd+n)
run flutter — version, to check if flutter is installed
now download Android Studio from https://developer.android.com/studio and install the dmg
now run Android Studio ( standard setup)
after installation, click on the configure button and open the Preferences
Go to Plugins and install the Flutter Plugin
I changed the font size (Font) so that the code will be more readable and also the theme to Darcula
IMPORTANT STEP:
Go to System Settings-> Android SDK -> SDK Tools and UNCHECK “HIDE OBSOLETE PACKAGES”
Install the Android SDK Tools (Obsolete)
restart Android Studio and start new Flutter project
choose Flutter Application
check if the Flutter SDK path is correct
click on finish and run the AVD Manager -> Tools/AVD Manager
Create a new device
Select an Android Version and download it
Run your virtual device with the triangle button under Actions
good job! we are done with the android part, go to Android Studio and run the program (^R)
Install Xcode and run it afterwards at least one time ( Appstore)
create a new terminal and insert following lines:
sudo xcode-select — switch/Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
you might need to install cocoapods: $ sudo gem install cocoapods
open the ios simulator with the terminal, type :open -a Simulator
run the simulator and start the application in Android Studio
if you want you can install Flutter in VSCode
now open the terminal and run flutter doctor -v to if everything works fine
Trouble shooting
- you might need to accept the android licenses :
flutter doctor — android-licenses