This is the fifth day of my participation in the August More text Challenge. For details, see:August is more challenging

Since I am an iOS developer, this article will focus on the installation process of the Flutter on MacOS, with a few steps in the middle, and now I will post the steps to configure the Flutter myself

Download the Flutter SDK package

Directly openOfficial iOS download addressTo find this download, I downloaded the version of MACOS _2.2.3

2. Unzip the SDK

I was downloaded down after the direct decompression, no command, feel double click to solve the problem, make so complex, strange strange. I double click to extract it and drag it directly to my user. Of course, some people really like to use the command line, if you use the command, you can copy it directly.

cd /Users/DaGongRen
unzip ~/Downloads/flutter_macos_22.3.-stable.zip
Copy the code

3. Configure environment variables

At first I followed the tutorial step by step. First open the terminal and enter the path where the Flutter is stored

cd /Users/DaGongRen/flutter
vim ~/.bash_profile
Copy the code

Use Vim to open this.bash_profileTo add configuration to this file, which is actually a hidden file that we can useshift + command + .Open the hidden file, my flutter is placed with this.bash_profileUnder the same level of directory.

I don’t like to use the command line, so I just open this file and add PATH to it

export PATH=/Users/DaGongRen/flutter/bin:$PATH
export PATH=/Users/DaGongRen/flutter/bin/cache/dart-sdk/bin:$PATH
Copy the code

Then close and then reopen the terminal

cd /Users/DaGongRen/flutter
flutter -h
Copy the code

The following screen appears, indicating that the environment has been successfully configured.

4. Check whether the installation is successful

Open the terminal and check whether the installation is successful

cd /Users/DaGongRen/flutter
flutter --version
Copy the code

If the following information is displayed, the installation is successful

“Command not found” : command not found Finally, I set the PATH in the.zshrc file instead of the.bash_profile file in Step 3

Next, verify that all dependencies are installed!

5. Install and diagnose

Diagnose the presence of uninstalled or successfully installed dependency options for the development of flutter by running the Flutter Doctor command.

Running the Unable to locate Android SDK we can see. You will be prompted to download a bunch of resources, you have to choose to agree, the content is relatively large, need to wait for some time. After that, continue flutter Doctor

When the download is complete, continue with the Flutter Doctor

Continue with the flutter doctor — Android-licenses. This prompt appears several times. Type y directly

The doctor continued to remind me

I continue with my flutter doctor — Android-licenses and this comes up

First, open Android Studio, go to Preferences, check this option on the app, and then it will download. Wait for a while, and then close it.

And then one last flutter doctor,ok, finally done.