> 文章列表 > flutter window安装过程

flutter window安装过程

flutter window安装过程

这里写自定义目录标题

#下载相关官网地址:https://flutter.cn/docs/get-started/install/windows

根据官网下载相关包flutter_windows_3.7.5-stable.zip 解压到c盘,在path配置相关解压路径(c:\\flutter)。
执行 where flutter dart ,发现没有提示。
然后执行

flutter doctor

flutter window安装过程

flutter window安装过程

问题1:cmdline-tools component is missing :是因为缺失了 Andriod SDK Command-line Tools(latest) 再andriod studio,settting> andrioid sdk>sdk tools 安装即可
flutter window安装过程

重新执行以下 :flutter doctor 可以发现 cmdline-tools component is missing已经解决。
flutter window安装过程
问题2:Windows Version (Unable to confirm if installed Windows version is 10 or greater) :
无法确认安装的Windows版本是否为10或更高,解决方案:降低flutter版本
flutter window安装过程
再网上搜到的答案需要用fvm对flutter进行版本管理。下面是试错过程。
下载 FVM 通过pub.dev下载,前提你得先单独安装一个Dart环境,点击获取。
因为flutter自身相关sdk直接配置相关路径即可。不过安装完后发现依然无法使用pub命令
flutter window安装过程
flutter window安装过程
配置安装完成后,用dart pub global activate fvm完成安装
flutter window安装过程
完成安装后发现有警告内容。
其他内容可忽略, dart_pub官方链接地址,pub 命令,查询资料过程中发现又pub有相关命令的使用。一直没找到,在使用dart pub get 时发现找不到pubspe.yaml相关文件。
flutter window安装过程
经过在flutter 文件下查找,找到C:\\flutter.pub-cache\\hosted\\pub.dev\\plugin_platform_interface-2.1.4 是在该文件下。切换至该路径下执行dart pub get 命令
flutter window安装过程
然后又执行了flutter pub get该命令
flutter window安装过程
配置FVM路径
flutter window安装过程

配置flutter默认管理下载路径,路径自己建立的文件夹,用于存放flutter版本更新相关
(命令:fvm config --cache-path D:\\FVM)
由于配置环境变量有些问题,导致命令未生效,只能在路径文件夹下执行。

.\\fvm config --cache-path D:\\FVM 

执行以下命令时发生错误 :No SDKs have been installed yet. Flutter. SDKs installed outside of fvm will not be displayed.

 .\\fvm list

然后执行 ./fvm releases命令查找版本 安装命令 .\\fvm install 3.7.5 安装提示报错异常
flutter window安装过程
修改 git安全设置 git config --global http.sslVerify false 下载相关futter .
flutter window安装过程
安装好了,发现版本还是过高,用FVM下载低版本fvm install 3.0.0

问题3 Android license status unknown. 需要将本地jdk升级到11
查看适配

flutter doctor --android-licenses

flutter window安装过程
按照jdk11版本中有配置环境遇到问题:重要的是,在 Path 的配置中,最好在第一行配置 %JAVA_HOME%\\bin 即可,不需要配置 jre ,JDK11已经无需再安装JRE,设置环境变量时也不用设置CLASSPATH了,

问题4 Visual Studio - develop for Windows ** 从 [https://visualstudio.microsoft.com/downloads/.]下载 (https://visualstudio.microsoft.com/downloads/.)
✗ Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the “Desktop development with C++” workload, including all of its default components

**问题4 ✗ HTTP host “https://maven.google.com/” is not reachable. Reason: An error occurred while checking the HTTP host:
信号灯超时时间已到

✗ HTTP host "https://cloud.google.com/" is not reachable. Reason: An error occurred while checking the HTTP host:信号灯超时时间已到**

哈哈,互联网 问题,大家自己解决哈。

前置问题,关于Andriod studio按照一级andriodjdk,主要还是网络问题。安装步骤就此完结哈。

flutter window安装过程