Android studio configures the Flutter development environment

Android studio configures the Flutter development environment

Table of contents

Used to[TOC] generate the directory:

1. System requirements

  • OS: Windows 7 or later (64-bit)
  • Disk space: 400 MB (not including disk space for Android Studio).
  • Tools: Flutter depends on these command line tools being available in your environment.
    [ Git for Windows ] (use Git in the Windows Command Prompt option)

    If you have Git for Windows installed, make sure you can run git commands from Command Prompt or PowerShell.
    Emphasis does not support Git Bash

  • Get the Flutter SDK
    Before getting the Flutter SDK , you need to download the git client . To get Flutter, use git to clone the repository, then add the flutter tool to your path. Running flutter doctor will show you any remaining dependencies you may need to install.

2. Configure environment variables, which is an essential step in China at present

If you are installing or using Flutter in China , it may be helpful to use a reliable local mirror site that hosts Flutter dependencies. To instruct the Flutter tools to use an alternate storage location, you need to set two environment variables, PUB_HOSTED_URL and FLUTTER_STORAGE_BASE_URL before running the flutter command.

export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
git clone -b dev https://github.com/flutter/flutter.git
export PATH="$PWD/flutter/bin:$PATH"
cd ./flutter
flutter doctor

Write picture description here
Write picture description here
Write picture description here
There are also git environment variables, please configure them in PATH

3. Download flutter SDK in CMD

Write picture description here
2. In this step, download the flutter project through git 3. Find the flutter\bin directory to download flutter doctor 4. Download the successful picture
Write picture description here

Write picture description here

Write picture description here

4. Open Android studio to download flutter and dart plugins

Write picture description here
Write picture description here

5. Create a new flutter project,

Write picture description here
Write picture description here
Write picture description here

If the project cannot be created, restart or log off the computer

Write picture description here

Guess you like

Origin blog.csdn.net/u013290250/article/details/79654526