1.下载flutter,android studio,git

android studio下载地址:https://developer.android.google.cn/studio/ 然后一路next

git下载地址:https://git-scm.com/download/win 然后一路next

flutter下载地址:https://flutter.dev 或者 https://flutterchina.club/ 然后一路next

flutter下载完成解压:注意不要将flutter安装到需要一些高权限的路径如C:\Program Files\

2.配置环境变量

打开解压后的flutter文件,找到bin文件,复制文件全路径,然后添加到uangjing变量里就可以了

window系统配置flutter环境

window系统配置flutter环境

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

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

window系统配置flutter环境

window系统配置flutter环境

然后重启window就可以

3.使用flutter doctor 检测

找到解压的flutter文件位置,双击flutter_console.bat,控制台输入flutter doctor

window系统配置flutter环境

 

5.

*报错

Error: The Flutter directory is not a clone of the GitHub project.

   The flutter tool requires Git in order to operate properly;

   to set up Flutter, run the following command:

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

解决方法

把刚刚下载的Flutter安装包删掉,重新在想要安装的目录下运行git clone -b beta https://github.com/flutter/flutter.git

 

*报错

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

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

 

解决方法:

File-setting-plugin 添加dart ,flutter两个依赖

 

*报错

window系统配置flutter环境

 

 某些 Android 许可证不被接受。

解决方法:

根据flutter doctor的提示运行flutter doctor --android-licenses

然后全部y就可以了

 

 

相关文章:

  • 2021-10-01
  • 2021-10-12
  • 2021-11-10
  • 2021-04-25
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
  • 2021-05-29
猜你喜欢
  • 2021-04-28
  • 2021-04-27
  • 2021-04-29
  • 2021-05-11
  • 2021-04-28
  • 2022-12-23
相关资源
相似解决方案