Download the flutter SDK

1. Download from the official website

To download the latest installation package, download the address



2. Decompress the installation package to a directory you want to install, for example:

cd ~/development

Unzip the ~ / Downloads/flutter_macos_v0. 5.1 beta. Zip

Create without the development directory, preferably in the development directory

3. Configure the flutter permanent environment variables

3.1 Edit. Bash_profile add the following code to create. Bash_profile.

export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
export PATH=PATH_TO_FLUTTER_GIT_DIRECTORY/flutter/bin:$PATHCopy the code

Ps: PATH_TO_FLUTTER_GIT_DIRECTORY indicates the path of your flutter

3.2 Run source $HOME/. Bash_profile to make the environment variables take effect, close terminal, open:

flutter doctor

Note: if you are using ZSH, ~/.bash_profile will not be loaded when the terminal starts. The solution is to modify ~/.zshrc to add: source ~/.bash_profile

Download the JDK

1. Official download

Click the official download address, download is required to log in Oracle account to download



2. After downloading, install the JDK foolishly

3. Open the terminal window and open the edit basic configuration file (.bash_profile).

The configuration code is as follows:

JAVA_HOME = / Library/Java/JavaVirtualMachines jdk1.8.0 _221. JDK/Contents/Home PATH =$JAVA_HOME/bin:$PATH:.
CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:.
export JAVA_HOME
export PATH
export CLASSPATHCopy the code

Note: the JDK in the JAVA_HOME variable must be changed to the version you downloaded. Mine is JDk1.8.0_221.jdk

4. Make the configuration take effect source.bash_profile

4.1 Viewing the Java Version: Java-version

Enter javac on the terminal

4.1 The system displays javAC help information. If yes, JDK has been configured. Otherwise, you need to check whether the configuration in the preceding steps is correct.

Download the Android Studio

1. Click the official website to download the address

Install the Flutter plugin after downloading