解决Windows10安装Flutter3.16.1遇到的问题

news/2024/7/3 2:32:35

问题描述

C:\Users\Administrator>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[] Flutter (Channel stable, 3.16.1, on Microsoft Windows [版本 10.0.18363.592], locale zh-CN)
[] Windows Version (Installed version of Windows is version 10 or higher)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    X cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[] Chrome - develop for the web
[X] Visual Studio - develop Windows apps
    X Visual Studio not installed; this is necessary to develop Windows apps.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components
[] Android Studio (version 2022.3)
[] IntelliJ IDEA Ultimate Edition (version 2023.2)
[] Connected device (3 available)
[!] Network resources
    X A cryptographic error occurred while checking "https://storage.googleapis.com/": Connection terminated during
      handshake
      You may be experiencing a man-in-the-middle attack, your network may be compromised, or you may have malware
      installed on your computer.
    X A network error occurred while checking "https://maven.google.com/": 信号灯超时时间已到


! Doctor found issues in 3 categories.

解决办法

问题1:cmdline-tools component is missing

安装Android SDK Command-line Tools(latest)
File -> Settings -> Preferences -> Appearance & behavior -> System Settings (dropdown) -> AndroidSDK->SDK Tools ->Android SDK Command-line Tools (latest)-> Apply

问题2:Android license status unknown.

执行命令

flutter doctor --android-licenses

问题3:Visual Studio not installed; this is necessary to develop Windows apps.

安装 vs
根据Windows的版本选择对应的Visual Studio版本下载
https://visualstudio.microsoft.com/zh-hans/downloads/

问题4:A network error occurred while checking “https://maven.google.com/”: 信号灯超时时间已到

修改文件D:\dev\flutter\packages\flutter_tools\lib\src\http_host_validator.dart中的const String kMaven = 'https://maven.google.com/';const String kMaven = 'https://maven.aliyun.com/repository/google/';

问题5:A cryptographic error occurred while checking “https://storage.googleapis.com/”: Connection terminated during handshake

  1. 添加环境变量
    在用户变量中新增两个变量如下:
PUB_HOSTED_URL  设置为  https://pub.flutter-io.cn
FLUTTER_STORAGE_BASE_URL  设置为  https://storage.flutter-io.cn
  1. 设置代理
set HTTP_PROXY=http://127.0.0.1:7890
set HTTPS_PROXY=http://127.0.0.1:7890
set NO_PROXY=localhost,127.0.0.1,::1

设置代理的方式仅对当前命令提示符窗口有效,关闭窗口失效

重新检测

C:\Users\Administrator>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[] Flutter (Channel stable, 3.16.1, on Microsoft Windows [版本 10.0.18363.592], locale zh-CN)
[] Windows Version (Installed version of Windows is version 10 or higher)
[] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[] Chrome - develop for the web
[] Visual Studio - develop Windows apps (Visual Studio Community 2019 16.11.32)
[] Android Studio (version 2022.3)
[] IntelliJ IDEA Ultimate Edition (version 2023.2)
[] Proxy Configuration
[] Connected device (3 available)
[] Network resources

• No issues found!

参考

https://flutter.cn/docs/get-started/install/windows
https://github.com/flutter/flutter/issues/24854#issuecomment-525105693


http://lihuaxi.xjx100.cn/news/1855363.html

相关文章

sso/单点认证的理解

目录 模拟一下SSO/单点认证的识别过程。举例:1. 是什么?2. 为什么出现?3. 怎么做?4. 结果会怎样?5. SSO当前的实现方式一、基于Token的认证二、基于OAuth2.0的认证 6. 和普通的登录注册的区别 模拟一下SSO/单点认证的识…

文件重命名不再困难:文件智能化重命名技巧,告别手动提升效率

在日常工作中,经常会遇到要修改文件名的场景。传统的文件重命名方法往往要手动输入新的文件名,不仅耗时而且容易出错。为了提高效率,可以采用一些智能化重命名的技巧,告别手动修改文件名的繁琐过程,让文件重命名变得更…

miot-plugin-sdk. npm install安装失败

miot-plugin-sdk-npm install安装失败 最紧公司要开发一台智能设备,经过同事的对比,选中了米家作为云平台,于是,我就负责开发app界面端,根据官方文档教程 下载了miot-plugin-sdk 程序,准备开始开发,结果悲…

数据库-MySQL之数据库必知必会17-21章

第17章 组 合 查 询 创建组合查询 可用UNION操作符来组合数条SQL查询。利用UNION,可给出多条SELECT语句,将它们的结果组合成单个结果集。 **例子:**假如需要价格小于等于5的所有物品的一个列表,而且还想包括供应商1001和1002生产…

上海毅速:深挖模具领域 成为行业变革者

近年来,3D打印在模具行业取得了大量的应用和拓展,越来越多的产品开始选择3D打印或者使用3D打印模具来进行制造。经过不断的发展,上海毅速副总王利军发现3D打印需要好的材料、好的工艺,同时也离不开好的装备平台。 在接受南极熊采访…

中国丙烯基弹性体PBE市场调研与预测报告(2023版)

内容简介: 丙烯基弹性体(PBE)是以丙烯为主要原料,加入少量乙烯(或α-烯烃)单体经溶液聚合而得到的以无定形区域为主的低结晶聚合物。与传统的乙丙橡胶不同,PBE的乙烯含量通常低于20%&#xff0…

SpringBoot+mysql+vue实现大学生健康档案管理系统前后端分离

一、项目简介 本项目是一套基于SpringBoot实现大学生健康档案管理系统,主要针对计算机相关专业的正在做bishe的学生和需要项目实战练习的Java学习者。 包含:项目源码、数据库脚本等,该项目可以直接作为bishe使用。 项目都经过严格调试&#…

简化控制台日志的输出内容

我们在运行或测试项目的时候,控制台会输出大量与SpringBoot启动和测试相关,以及与Mybatis-Plus启动相关的输出日志。这些输出日志会占用大量的篇幅,不利于我们查看项目的运行日志和测试结果。 简化控制台输出日志: 1. 在resources…