(一)Dart 使用 VSCode编辑。(简单 实用)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的编写步骤。
网友评论