美文网首页
Flutter 配置 (最全实践步骤)

Flutter 配置 (最全实践步骤)

作者: 武汉刘德华 | 来源:发表于2021-08-30 14:33 被阅读0次

(一)Dart 使用 VSCode编辑。(简单 实用)homebrew的下载我就不说了。

国内homeBrew下载

(二)Flutter 下载

1.官网下载最新SDK,拖到Application中(是整个文件拖进去,懂了吧)。

2.创建base.profile文件 

(1)终端: touch .bash_profile      (创建)

(2)终端:source .bash_profile  (保存)

3.配置 base.profile

(1)环境配置:

终端:open -e .bash_profile 

export PUB_HOSTED_URL=https://pub.flutter-io.cn

export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

终端:source .bash_profile

(2)路径配置:

export PATH=$PATH:/Applications/flutter/bin   (我放在Applications中)

终端:source .bash_profile

完事之后

4. 配置Xcode

1. 终端: flutter doctor

需要配置

2.完成配置

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

sudo xcodebuild -runFirstLaunch


完成

(三)运行使用

1.创建一个项目

flutter create flutterApp

我的位置

2.打开运行

 cd flutterApp

flutter run

完事

这里就完全配置成功了。全部步骤就在这里了。

然后这边使用的暂时是VSCode进行编写。下面会详解 使用Xcode配置APPli'cation文件,并使用VSCode编写项目。

然后会使用MAC配置IJK环境 和安卓studios 环境,使用夜神模拟器进行安卓Flutter的编写步骤。

相关文章

网友评论

      本文标题:Flutter 配置 (最全实践步骤)

      本文链接:https://www.haomeiwen.com/subject/dvxoiltx.html