02_Flutter安装

安装Flutter:

1.点击链接,下载压缩包:

https://flutter.dev/docs/get-started/install/linux

2.选一个心仪的文件夹(例如 development ),解压缩:

$ cd ~/development

$ tar xf ~/Downloads/flutter_linux_1.17.1-stable.tar.xz

3.设置环境变量(永久设置):

//profile 是开机就会自启的文件,打开后编辑
$ sudo vim /etc/profile    

//文件末尾添加如下内容,路径为上一步 Flutter 解压后所在的地方
export PATH=$PATH:/home/ldsdsy/development/flutter/bin

//强制执行 profile 或 重启
$ source /etc/profile

//查看是否添加成功
$ echo $PATH

4.输入 flutter 检测是否安装完成。

Adds:
//若出现 Error: Unable to find git in your PATH.

$ sudo apt-get install git
Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy