Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to build Flutter development environment

Shulou Source: shulou.com Published: 2022-06-01 22:34:11 10月03日 Update

Editor to share with you how to build the Flutter development environment, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

1.Clone Flutter repo

Create a new directory to run:

Git clone-b beta https://github.com/flutter/flutter.git

Clone Flutter's warehouse locally.

Configure the environment, run:

Export PUB_HOSTED_URL= https://pub.flutter-io.cn / / domestic users need to set

Export FLUTTER_STORAGE_BASE_URL= https://storage.flutter-io.cn / / domestic users need to set

Export PATH= `pwd` / flutter/bin:$PATH

After the environment is configured, run the following command to check the tools, and Flutter will check and install some of the required tools:

Flutter docotor

At this stage, my configuration will indicate some errors:

[✓] Flutter (Channel beta, v0.5.1, on Mac OS X 10.13.5 17F77, locale zh-Hans-CN)

[!] Android toolchain-develop for Android devices (Android SDK 28.0.0)

! Some Android licenses not accepted. To resolve this, run: flutter doctor-- android-licenses

[!] IOS toolchain-develop for iOS devices (Xcode 9.4.1)

✗ Brew not installed; use this to install tools for iOS device development.

Download brew at https://brew.sh/.

[✓] Android Studio (version 3.0)

✗ Flutter plugin not installed; this adds Flutter specific functionality.

✗ Dart plugin not installed; this adds Dart specific functionality.

[✓] Connected devices (1 available)

For the AndroidStudio ✗ section above, you only need to install the Flutter plug-in in Plugin in AndroidStudio.

The warning for 'Some android licenses not accept' can be run:

Flutter doctor-android-licenses

Then always fill in "y" and say yes.

two。 Configure your IDE (take Android Studio as an example)

You need the Android Flutter and Dart plug-ins in Android Studio (use ⌘, call up the settings page, search for installation in Plugin), and then restart your Android Studio.

3. Create your first Flutter project (take Android Studio as an example)

NEXT through File-> new flutter project-> of AndroidStudio

It can be time-consuming to create a project for the first time.

At this point, your development environment has been built.

These are all the contents of the article "how to build a Flutter Development Environment". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Environment run configure Development articles content tools plug-ins users parts Project Zhongan Inspection above not much Warehouse commands most more directories Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi MySQL Microsoft NVidia Huawei