1 安装Flutter
git clone -b master https://github.com/flutter/flutter.git
./flutter/bin/flutter --version
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
export PATH=`pwd`/flutter/bin:$PATH

2 运行 flutter doctor
安装依赖

3 iOS设置
3.1 模拟器设置
Xcode我使用的11.2.1版本,直接执行
open -a Simulator
flutter run
第一次执行时间比较长,需要下载些配置

运行结果:

解决办法: 进入app的路径,在执行
再次执行,又有如下提示: please specify a device with the '-d <deviceId>' flag, or use '-d all' to act on all devices
模拟器和真机选择其中一个即可 执行 flutter run -d EB2E8B57-AE05-4AB9-BE18-A7E0D1EA146E
网友评论