Table of contents
2.1 Step 1: Download and configure Flutter
2.2 Step 2: Download and configure Android Studio
2.3 Step 3: Download and configure VScode
1 Official documentation
Domestic image Flutter download address: https://storage.flutter-io.cn/flutter_infra_release/releases/stable/windows/flutter_windows_3.10.2-stable.zip
Remember to refer to the official documentation, change the Flutter version to the latest version, and download the Chinese mirror version.
2 Installation configuration
2.1 Step 1: Download and configure Flutter
Download the image version of Flutter, unzip it and put it in a custom path, for example:
Configure environment variables>User variables>Path : so that you can use it directly in the cmd command panelflutter命令了:
To handle the following errors:
Network resources
X A cryptographic error occurred while checking "https://pub.dev/": Connection terminated during handshake
You may be experiencing a man-in-the-middle attack, your network may be compromised, or you may have malware
installed on your computer.
X A network error occurred while checking "https://maven.google.com/": 信号灯超时时间已到
Configure the mirror address into system variables
PUB_HOSTED_URL=https://pub.flutter-io.cn
FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
2.2 Step 2: Download and configure Android Studio
Remember to install and configure the java environment first, and install the jdk1.8 version.
Download address for the latest version of Android Studio: Download Android Studio & App Tools - Android Developers
Just follow the prompts to install and configure everything.
1. If an error is reported when configuring Android Studio:
Android Studio First Run unable to access Android SDK add-on-list.....
Solution: Add the last sentence to the bin/idea.properties file in the Android Studio installation directory:
disable.android.first.run=true
After the installation is complete, open the SDK manager:
As shown below:
2. If you have customized the SDK path, then you need to modify the flutter configuration to specify the android-sdk directory.
Otherwise, an error will always be reported:
X cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
cmd opens the command panel and enters
flutter config --android-sdk "你自定义的sdk路径"
3. If your java environment is jdk8, then you cannot download the latest Android SDK Command-line Tools. You need to check the red box at the bottom and choose to install version 8.0.
Otherwise an error will be reported:
Android sdkmanager tool was found, but failed to run
Next, enter in the cmd command panel, keep pressing y, and agree to the Android protocol:
flutter doctor --android-licenses
Then, enter flutter doctor in the cmd command panel to verify whether the configuration is successful:
flutter doctor
For more questions, please refer to: Flutter Learning Journey (1)_Asing Asuna is my wife’s blog-CSDN Blog
Finally, install the Flutter plug-in in Android Studio. At this point, the configuration is complete.
2.3 Step 3: Download and configure VScode
visual studio code download address: Visual Studio Code - Code Editing. Redefined
Install the Flutter and Dart plug-ins and restart VS Code
Verify whether the installation is successful through the Flutter Doctor command:
Open View>Command Panel , enter doctor , and select Flutter: Run Flutter Doctor
Output the following picture, the installation is successful: