flutter series 5-flutter environment construction

Introduction to flutter

Flutter is an open source, free mobile framework developed by Google, which allows us to quickly build high-quality apps on Android and IOS. Its biggest feature is cross-platform and high performance. Flutter is based on Google's dart language. If you don't have dart-based students, you can read the previous introduction to dart.
This article is based on a certain Android development foundation. If you do not have Android development students, please configure jdk and install Android Studio.

Environmental preparation

flutter installation configuration

flutter sdk download: https://flutter.dev/docs/get-started/install/windows

Add environment variables:
If there is no VPN, you can configure the domestic mirror
export PUB_HOSTED_URL = https: //pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL = https: //storage.flutter-io.cnUnzip the
downloaded flutter sdk and enter the bin directory , Configure the bin directory to the path environment variable

Execute after the configuration is complete:

 flutter doctor

Insert picture description here
It can be seen that there are several errors, because my local computer is installed with indtel idea, we use Android studio, so the second and third items do not need to be processed, and the fourth is that there is no device connected. , There is no need to deal with here, see the first error, we directly follow the error prompt and execute the command:

flutter doctor --android-licenses

Enter y all the way, press Enter, and then execute fluteer doctor when you are done, you will see that the first error report is gone, and the flutter environment is installed.

Android studio configuration

Two plug-ins need to be installed:
Flutter plug-in: supports Flutter development workflow (run, debug, hot reload, etc.).
Dart plug-in: provides code analysis (validation, code completion, etc. when entering code).

Installation steps:
Start Android Studio.
Open the plugin preferences (Preferences> Plugins on macOS, File> Settings> Plugins on Windows & Linux).
Select Browse repositories…, select the Flutter plugin and click install. The
plugin takes effect after restarting Android Studio.

flutter first experience

Insert picture description here
Create a new flutter project
Insert picture description here
Insert picture description here
Insert picture description here
as long as it is not filled in. After the creation is complete, connect the phone and run directly, you can see that the application has been launched
Insert picture description here

Published 159 original articles · 22 praises · 90,000+ views

Guess you like

Origin blog.csdn.net/ytuglt/article/details/105102711