flutter安装详解

1:下载flutter官方文件解压在C盘一个连续无空格和奇怪字符的文件夹里

2:环境变量PATH里添加 .../fluttersdk/bin

3:去JAVA下载JRE和JDK并安装

4:下载Android Studio并安装(Unable to access Android SDK add-on list 那步直接跳过),会自动安装SDK

5:进Android Studio选tools->SDK manage 复制里面的SDK路径,去环境变量里设置ANDROID_HOME C:\Users\xxx\AppData\Local\Android\Sdk

6:环境变量里同时设置 SDK路径下platform-tools和tools 2个文件夹路径进PATH

7:环境变量里设置

PUB_HOSTED_URL https://pub.flutter-io.cn

FLUTTER_STORAGE_BASE_URL https://storage.flutter-io.cn

8:Android Studio 选中点OK

9:DOS输入flutter doctor --android-licenses 一路y

10:DOS输入flutter doctor 除了window系统外必须全部打勾。

如果提示

X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop

development with C++" workload, and include these components:

MSVC v142 - VS 2019 C++ x64/x86 build tools

- If there are multiple build tool versions available, install the latest

C++ CMake tools for Windows

Windows 10 SDK

需要打开vs2022的安装文件勾选下载安装c++桌面开发

11:vscode插件里下载插件

flutter安装详解_第1张图片

12:安装完成!

你可能感兴趣的:(flutter,android,studio,android)