Summary of build up the Flutter environment
This article is the first one about Flutter – the construction of flutter development environment. During the construction process, I also encountered many disappointments.
Environment set up
Refer to the link
- windows
- Install the flutter SDK
- Download flutterSDK
- FlutterSDK website address select stable version
- Decompress configuration environment variables
-
Using a mirror
- Because domestic access to Flutter may sometimes be restricted, Flutter officials have created a temporary mirror for Chinese developers to add the following environment variables to the environment variables:
-
The variable name A variable’s value PUB_HOSTED_URL pub.flutter-io.cn FLUTTER_STORAGE_BASE_URL storage.flutter-io.cn
-
System environment variables are configured
- will
Decompress the project path /flutter/bin
Add to path of system variable
- will
-
Run test flutter
- The Flutter Doctor will install dependencies for flutter development. This is a slow process and we encourage you to be patient
- The Flutter Doctor will handle the differential environment and display a report in the port. These “xs” will resolve our environment and install successfully
- Download flutterSDK
-
macos
- IOS needs to install Xcode, we need the IOS Simulator provided in Xcode (Open Xcode, click xcode-open Developer Tools-simulator in the upper right corner)
-
- Download flutterSDK
- FlutterSDK website address select stable version
- Decompress configuration environment variables
- Macos or Linux need to edit the ~/.bash_profile file (ZSH configuration ~/.zshrc file).
export PUB_HOSTED_URL=https://pub.flutter-io.cn
(Set for domestic users)export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
(Set for domestic users)Export PATH= Decompress the project PATH /flutter/bin
// PWD puts a flutter file path such as /Users’source ~/.bash_profile
- Run flutter –version and the image succeeds
- Run test flutter
- The Flutter Doctor will install dependencies for flutter development. This is a slow process and we encourage you to be patient
- The Flutter Doctor will handle the differential environment and display a report in the port. These “xs” will resolve our environment and install successfully
-
Install and configure the Android environment
-
If you want to configure the Android development environment for Flutter, you need to install Android Studio on your computer
-
Once installed, we can create the emulator: select configure-avd Manger
-
Select Create Virtual Device to Create the emulator
-
Give your simulator a name
-
Install the Flutter and Dart plug-ins in Android Studio configuration
-