Configure the Flutter development environment

1. Build a Flutter development environment on Windows

1. Go to the flutter official website to download the latest available installation package, download address: https://flutter.dev/docs/development/tools/sdk/releases.
Note that the channel version of Flutter is constantly being updated, please refer to the official website of Flutter.
In addition, in mainland China, if you want to get the installation package list or download the installation package normally, you may need to go over the wall, or you can go to the Flutter github project to download the installation package, address: https://github.com/flutter/flutter/releases . After the download is complete, unzip it.flutter official website.png

2. Configure environment variables

In Windows 10, add in Settings-System-About-Advanced System Settings-Environment Variables-System Variables:
[External link picture transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the picture and upload it directly (img-xkXDorhL-1677131718982) (https://upload-images.jianshu.io/upload_images/7320376-569e538784e3ae0d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)]
Add under path:
environment variable 2.png
the path corresponds to the path where FlutterSDK is stored

%FLUTTER_HOME%\bin
D:\Flutter\flutter\bin\cache\dart-sdk\bin

3. Check the operating environment

Run the following command on the Flutter command line to see if any other dependencies need to be installed, and if so, install them:

flutter doctor

This command checks your environment and displays a report in the command window. The Dart SDK is already packaged in the Flutter SDK, there is no need to install Dart separately. Carefully examine the command line output for additional software that may need to be installed or further tasks to be performed.Check the operating environment.png

The first time you run a flutter command (like flutter doctor), it downloads it's own dependencies and compiles itself. It will be much faster to run later. The missing dependencies need to be installed. After the installation is complete, run the flutter doctor command to verify whether the installation is successful.

4. Android studio configuration flutter plug-in

Search for "flutter" and "dart" in Android Studio File-Settings-Plugins, click to install the corresponding pluginAndroid studio flutter plugin.png

Guess you like

Origin blog.csdn.net/Billy_Zuo/article/details/129180196