搜索
您的当前位置:首页正文

windows flutter 开始

来源:二三娱乐

If you’re installing or using Flutter in China, it may be helpful to use a trustworthy local mirror site that hosts Flutter’s dependencies. To instruct the Flutter tool to use an alternate storage location, you will need to set two environment variables, PUB_HOSTED_URL and FLUTTER_STORAGE_BASE_URL, before running the flutter command.

Taking MacOS or Linux as an example, here are the first few steps in the setup process for using a mirror site. Run the following in a Bash shell from the directory where you wish to store your local Flutter clone:

中国用户镜像设置

export 
export  //windows直接设置环境变量
git clone -b alpha 
export PATH="$PWD/flutter/bin:$PATH"
cd ./flutter
flutter doctor

1.下载并安装git

2.clone项目到本地(不会的可以百度看看)

alpha branch

git clone -b alpha 

master branch

git clone  

3.设置环境变量

path 添加 E:\ ++[flutter 路径]++ \flutter\bin

4.运行命令 完成flutter的安装

cmd 运行

flutter doctor

由于网络原因可能会需要很久或者多次失败。实在不行可以 科学上网,例如 ssr+Proxifier ,或者设置文章开头提到的中国镜像

5.下载安装 idea (社区版是免费的) androidStudio 3.0 + 也行

6.安装 flutter 和 dart插件

plugin里面搜索安装

7.创建 flutter 项目,脚手架的demo就直接可以运行了

Top