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 ...
随机推荐
- 学习Struts--Chap06:Struts2之数据验证
1.数据验证的概述 1.1.数据验证的重要性 数据验证是非常必要的,不但和我们的常识性理解有关系,还有可能涉及到一些非法输入等问题,所以我们需要进行必要的数据验证,以保证我们在数据输入的时候都是正确且 ...
- Vue(四)事件和属性
1. 事件 1.1 事件简写 v-on:click="" 简写方式 @click="" <button v-on:click="show&quo ...
- 【map离散&容斥】Ghosts @Codeforces Round #478 (Div. 2) D
传送门 题意:给你一条直线的斜率a和截距b,和某一时刻n个在直线上的点的横坐标,以及沿坐标轴方向的速度.问你这些点在(-∞,+∞)的时间内的碰撞次数. solution 设两个点在t时刻相碰,有: x ...
- Aizu2224 Save your cats(最大生成树)
https://vjudge.net/problem/Aizu-2224 场景嵌入得很好,如果不是再最小生成树专题里,我可能就想不到解法了. 对所有的边(栅栏)求最大生成树,剩下来的长度即解(也就是需 ...
- pygame-KidsCanCode系列jumpy-part7-游戏启动/结束画面
通常一个游戏启动(start)或结束(game over)时,都会显示一个画面,来引导用户.这节,我们学习如何处理这块逻辑. 其实之前,我们已经预留了2个函数,只要把它实现即可: def show_s ...
- 搜狗拼音输入法 V9.1.0.2589 最新去广告精简优化版
搜狗拼音输入法9.0 正式版例行发布,最新版字母代号b,详细版本号为v9.1.0.2589:搜狗拼音输入法是电脑装机必备软件,版本有传统版和智慧版之分,其打字超准.词库超大.速度飞快.外观漂亮,因此使 ...
- Git 和 Repo常用命令
这篇博客总结的也不错: git常用及进阶命令总结 Git与Repo入门 一.初始環境配置 git config --global user.name "John Doe"git c ...
- AXI总线介绍
原帖地址:https://wenku.baidu.com/view/7c424c17e3bd960590c69ec3d5bbfd0a7956d5b9.html 1.AXI简介 AXI(Advanc ...
- Android 使用easeui 3.0 集成环信即时通讯 我踩过的坑
0.关于注冊账号就不用说了. 1.创建应用.获取appkey 0.创建应用 1.填写信息 2.获取appkey 2.集成 0.首先新建一个project 1.这里主要介绍使用easeui来集成环信的即 ...
- (三)underscore.js框架Objects类API学习
keys_.keys(object) Retrieve all the names of the object's properties. _.keys({one: 1, two: 2, three ...