Article Directory
- I. Flutter learning materials
- II. Flutter development environment to build
- III. Android Studio environment installation Flutter / Dart plug
- IV. Download Flutter SDK
- V. Set Flutter network mirror (Chinese domestic recommended setting)
- VI. Flutter set environment variables (variables in the system configuration)
- VII. Flutter environment variable inspection
I. Flutter learning materials
Flutter learning materials:
① official document: https://flutter.dev/docs
② Flutter Android developer documentation: https://flutter.dev/docs/get-started/flutter-for/android-devs
② Flutter plug-in library: https://pub.dev/
II. Flutter development environment to build
Flutter development environment to build:
Android Studio ①: https://developer.android.google.cn/studio , requires 3.0 or later; Google provides Android development environment;
② Windows PowerShell 5.0: recommended to use Win10 (the pre-installed), new command-line tools, cmd (command prompt) has been extended;
Git ③: https://git-scm.com/download/win , code management tool, you can install the latest version;
III. Android Studio environment installation Flutter / Dart plug
. 1 Flutter search plugin installed: Android Studio menu bar -> File -> Settings -> Plugins, search Flutter plug in the Marketplace, click on the Install button to install;
2. Click Install to install: will be prompted to rely on third-party plug-ins, you need to install the plug-Dart, Dart here need to install plug-ins;
3. accept the installation of third-party plug-ins:
4 Install the plug-Dart:
. 5 Flutter / Dart plug-in installation is complete:
6. Restart Android Studio: After installation, restart Android Studio plug-ins to take effect;
IV. Download Flutter SDK
1. Download Flutter SDK: If the official download link to download is too slow, please download the following Chinese mirror download link ;
2. Download: https://flutter.dev/docs/development/tools/sdk/releases , select the stable version of the latest version can be; (official link, the download speed may be slow)
3. Mirror Download address generation: the need to replace the domain name to obtain the latest address to manually download mirror;
① Generate Mirror Download: link to the official website of the basic fixed under in China, the use of storage.flutter-io.cn
the domain name to replace the download link in the storage.googleapis.com
domain can use the mirror link to download the latest version; (this address current needs its own generation)
② official download link: https://storage.googleapis.com/flutter_infra/releases/stable/windows/flutter_windows_v1.12.13+hotfix.8-stable.zip is currently the latest Flutter SDK download address, do not move at this link, use use storage.flutter-io.cn
the domain name to replace the download link in the storage.googleapis.com
domain, namely the following image Download;
③ Mirror Download: https://storage.flutter-io.cn/flutter_infra/releases/stable/windows/flutter_windows_v1.12.13+hotfix.8-stable.zip , the address to download quickly, if the latest version, you can generate a new image-replaceable Download;
V. Set Flutter network mirror (Chinese domestic recommended setting)
1. Mirror address lookup: In https://flutter.dev/community/china check the latest Flutter Chinese mirror address of the page;
2 is the most current image: The following two mirror address provided to the environment variable;
FLUTTER_STORAGE_BASE_URL: https://mirrors.sjtug.sjtu.edu.cn/
PUB_HOSTED_URL: https://dart-pub.mirrors.sjtug.sjtu.edu.cn/
If you set up at home or look better, it could save a lot of things;
VI. Flutter set environment variables (variables in the system configuration)
1. Configuration Flutter environment variable: i.e. above flutter_windows_v1.12.13 + download the file decompression hotfix.8-stable.zip bin directory, Path environment variable in the configuration;
D:\001_Programs\004_Flutter\flutter\bin
2. Configure site resources mirroring environment variables:
变量名(N):FLUTTER_STORAGE_BASE_URL
变量值(V):https://mirrors.sjtug.sjtu.edu.cn/
变量名(N):PUB_HOSTED_URL
变量值(V):https://dart-pub.mirrors.sjtug.sjtu.edu.cn/
3 Configure Android SDK environment variables in the specified format:
① configure Android SDK path: it must first configure ANDROID_HOME environment variables, configuration content is the root of the Android SDK;
变量名(N):ANDROID_HOME
变量值(V):D:\001_Programs\001_Android\002_Sdk\Sdk
② arranged Android SDK environment variables related to: the need in the Path environment variable, configure emulator, platform-tools, tools address; format are
%ANDROID_HOME%\emulator
%ANDROID_HOME%\platform-tools
%ANDROID_HOME%\tools
VII. Flutter environment variable inspection
1. Check the environment: After the above operation, executing flutter doctor command to check Flutter development environment; the first run command relatively long time consuming 5 to 10 minutes or more, to wait;
2. All agreed License: According to the above prompt, performing flutter doctor --android-licenses command, all agree to the license agreement, can be detected by;