Flutter & Dart 安装在window系统
一、系统环境
flutter最低要求
1,windows7 SP1 64位版本以上,我的系统就是windows 7 sp1 64bit
2,git for windows ,没有安装的需要到这里下载 并安装
3,powershell 5.0及以上,这个据说只有windows10和2016版windows server满足要求
window7 sp1以及自带Powershell,但是版本较低,我的系统中版本居然是2.0
启动:系统左下角-开始-点击搜索框-输入powershell-回车键
在powershell中输入 $PSVersionTable 然后回车,查看其中的PSVersion一行 Windows PowerShell
版权所有 (C) Microsoft Corporation。保留所有权利。 PS C:\Users\gzg> $PSVersionTable Name Value
---- -----
CLRVersion 2.0.50727.8793
BuildVersion 6.1.7601.17514
PSVersion 2.0
WSManStackVersion 2.0
PSCompatibleVersions {1.0, 2.0}
SerializationVersion 1.1.0.1
PSRemotingProtocolVersion 2.1 PS C:\Users\gzg>
如何查看PowerShell版本
由于PS没有单独的发行包,只能下载WMF5.1的发行包
下载后展开,包含如下两个文件,右键点击Install-WMF5.1.ps1,选择用powershell运行安装,过程不赘述。
4,安装配置好android SDK,并建立一个模拟器
5,Android Studio,如果没有请安装http://www.androiddevtools.cn/。
二、下载安装flutter sdk
1,进入预存放flutter目录的父目录中,从github克隆flutter beta版
git clone -b beta https://github.com/flutter/flutter.git
2,设置环境变量
1)将 *\flutter\bin目录加入到环境变量path中

2)添加ANDROID_HOME环境变量,指向android SDK所在目录

3, 设置国内镜像代理,然后执行flutter doctor
打开dos窗口,设置国内镜像
set PUB_HOSTED_URL=https://pub.flutter-io.cn
set FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
备注:或者也可以直接添加系统变量,以备以后升级安装方便。
4,进行下一步之前,首先关闭杀毒杀木马程序,例如360之类,否则“flutter\bin\cache\artifacts\engine\android-arm64-release\windows-x64\gen_snapshot.exe” 会被认成木马,造成运行失败!
我这里的报错信息如下:
K:\Android\flutter>flutter doctor
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source! Oops; flutter has exited unexpectedly.
Sending crash report to Google.
或者,给目录“flutter\bin”添加到信任白名单。如果还有问题,看一看flutter目录下的“flutter_##.log”文件查找原因,然后在解决即可。
5,运行flutter设置命令
flutter doctor
flutter会检测flutter SDK安装情况,然后下载dart SDK和其他依赖项目,由于网络问题运行时间较长,期间不免发生失败情况,需要多运行几次。
PS C:\Users\gzg> flutter doctor
Downloading android-arm-release/windows-x64 tools...
Download failed -- attempting retry 1 in 1 second...
Download failed -- attempting retry 2 in 2 seconds...
Download failed -- attempting retry 3 in 4 seconds...
Download failed -- attempting retry 4 in 8 seconds...
Download failed -- attempting retry 5 in 16 seconds...
Download failed -- attempting retry 6 in 32 seconds...
Download failed -- attempting retry 7 in 64 seconds...
Download failed -- attempting retry 8 in 64 seconds...
365.2s
Downloading android-arm64-profile/windows-x64 tools... 8.2s
Downloading android-arm64-release/windows-x64 tools... 7.6s
Downloading android-x86 tools...
Download failed -- attempting retry 1 in 1 second...
Download failed -- attempting retry 2 in 2 seconds...
142.8s
Downloading android-x64 tools... 53.4s
Downloading android-arm tools... 24.4s
Downloading android-arm-profile tools... Oops; flutter has exited unexpectedly.
Sending crash report to Google.
Failed to send crash report due to a network error: SocketException: OS Error: ä¿¡å·ç¯è¶…时时间已到
, errno = 121, address = clients2.google.com, port = 60527
Crash report written to C:\Users\gzg\flutter_03.log;
please let us know at https://github.com/flutter/flutter/issues.
PS C:\Users\gzg> flutter doctor
Downloading android-arm-profile tools...
Download failed -- attempting retry 1 in 1 second...
Download failed -- attempting retry 2 in 2 seconds...
Download failed -- attempting retry 3 in 4 seconds...
Download failed -- attempting retry 4 in 8 seconds...
Download failed -- attempting retry 5 in 16 seconds...
Download failed -- attempting retry 6 in 32 seconds...
254.5s
Downloading android-arm-release tools...
Download failed -- attempting retry 1 in 1 second...
61.0s
Downloading android-arm64 tools... 27.6s
Downloading android-arm64-profile tools...
Download failed -- attempting retry 1 in 1 second...
71.0s
Downloading android-arm64-release tools...
Download failed -- attempting retry 1 in 1 second...
Download failed -- attempting retry 2 in 2 seconds...
Download failed -- attempting retry 3 in 4 seconds...
Download failed -- attempting retry 4 in 8 seconds...
Download failed -- attempting retry 5 in 16 seconds...
6,最后,flutter doctor命令会给出环境检测结果,如果有些项目有问题,则按照其中说明修正,例如,我这里有两项有问题:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel unknown, v0.0.0-unknown, on Microsoft Windows [Version 6.1.7601], locale zh-CN)
[!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[√] Android Studio (version 3.2)
[√] IntelliJ IDEA Community Edition (version 2018.2)
[!] Connected device
! No devices available ! Doctor found issues in 2 categories.
第二项问题依照蓝色提示操作即可解决。最后一项虚拟机,建立一个虚拟机并启动,再次运行检测,没问题了!
C:\Users\gzg>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel unknown, v0.0.0-unknown, on Microsoft Windows [Version 6.1.7601], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[√] Android Studio (version 3.2)
[√] IntelliJ IDEA Community Edition (version 2018.2)
[√] Connected device (1 available) • No issues found!
三、开始flutter之旅
在android studio中建立flutter项目
菜单“File--New--New Flutter Project...”,第一步选择“Flutter Application”,第二部输入项目名称,注意一定要选中下面的选项“create project offline”,否则在我的网络环境下就进行不下去了。

Flutter & Dart 安装在window系统的更多相关文章
- [flutter+dart] windows7下开发环境的安装与配置
前言 博主是做嵌入式的,参加工作时间也不久,而且是非科班出身,之前从未接触过移动开发.最近了解到了flutter框架和dart语言,想作为第二语言学习一下,因此会从最基础的环节开始,以此博客作为记录, ...
- 【Flutter 1-2】在 Windows 10下安装Flutter+Dart+Android Studio 配置Flutter开发环境
在 Windows 10下安装Flutter+Dart+Android Studio 配置Flutter开发环境 文章首发地址 配置环境变量 由于部分网站被墙的原因,我们需要先配置Flutter国内镜 ...
- vsftpd安装和使用 Linux系统和window系统
vsftpd 安装(Linux)一.安装系统环境 centos 6.9 64位二.vsftpd版本 vsftpd-2.2.2-24.el6.x86_64三.安装步骤1.安装 执行 yum -y ins ...
- 在window系统下安装Sass
1.Ruby下载 因为Sass依赖于Ruby环境,所以应先在window系统下安装Ruby,Ruby安装包下载链接:http://rubyinstaller.org/downloads/ 2.Ruby ...
- U盘安装window系统
U盘安装window系统: 1. 制作系统启动U盘,推荐使用老毛桃. 2. 电脑上插入U盘,启动系统,选择U盘启动. 3. 进入老毛桃选择界面,选择生成PE系统.推荐win8,之前在一个戴尔电脑上使用 ...
- mac系统 flutter从安装到第一个应用
mac系统 安装flutter 分三步: 1. 安装flutter sdk 2. flutter环境变量配置 3. 建立flutter应用 Flutter SDK下载 打开终端执行命令 git clo ...
- kvm安装window系统及使用NFS动态迁移
验证是否开启虚拟化 # grep -E 'svm|vmx' /proc/cpuinfo - vmx is for Intel processors - svm is for AMD processor ...
- mysql 学习之1 mysql在window系统下的安装
转载: https://blog.csdn.net/weixin_43295278/article/details/8287440 此方法只 适用 于window系统 坑 此篇文章在使用 alter ...
- Flutter开发环境(Window)配置及踩坑记录
Flutter 是 Google 用以帮助开发者在 iOS 和 Android 两个平台开发高质量原生 UI 的移动 SDK.Flutter 兼容现有的代码,免费且开源,在全球开发者中广泛被使用. F ...
随机推荐
- 游戏UI规范
在满足效果的前提下,尽量做到UI资源做到复用和最小化 1. 背景1和背景2分开切,可以组合成各种不同的面包背景图 2. 背景1和背景2在没有花纹的情况下,中间纯色的部分切4个像素做就公共个缩放就可 ...
- redis:sentinel监控服务器
1. Sentinel工具完成监控--操作步骤 (1)把redis解压包中的sentinel.conf拷贝到redis的安装目录下: [root@192 redis]# cp /opt/redis-4 ...
- 创建xml文件、解析xml文件
1.创建XML文件: import codecs import xml.dom.minidom doc=xml.dom.minidom.Document() print doc root=do ...
- AtCoder Regular Contest 080 [CDEF]
C - 4-adjacent Time limit : 2sec / Memory limit : 256MB Problem Statement We have a sequence of leng ...
- elastic-job详解(五):自定义任务参数
在elastic-job详解(三):Job的手动触发功能一文中讲到了如何手动触发一个Job,但是我们手动触发的时候常常需要输入一些参数.举个栗子:我们有个日统计报表,每天凌晨统计一次,统计上一天的数据 ...
- web的几种返回顶部
回到顶部backtoTop 滚动回到顶部 jquery/js效果还不错!支持现代浏览器包括 ie6.position: absolute;和fixed.两种方法! 一,jQuery方法的backtoT ...
- ARM64 __create_page_tables分析
span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }.CodeMirror ...
- oracle操作字符串:拼接、替换、截取、查找、长度、判断
1.拼接字符串 1)可以使用“||”来拼接字符串 select '拼接'||'字符串' as str from dual 2)通过concat()函数实现 select concat('拼接', '字 ...
- [MySQL]查看用户权限与GRANT用法
摘自:http://apps.hi.baidu.com/share/detail/15071849 查看用户权限 show grants for 你的用户 比如:show grants for roo ...
- Github超棒资源汇总
Awesome List 中文资源大全 经典编程书籍大全 免费的编程中文书籍索引 awesome-awesomeness-zh_CN https://github.com/jnv/lists awes ...