本文共 1176 字,大约阅读时间需要 3 分钟。
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
git clone -b stable https://github.com/flutter/flutter.git
flutter doctor
之后就可以通过File 新建Flutter工程
5 新建一个Flutter工程,试运行。在运行前需要先启动模拟器,这点与原生Android不同。Failed to install the following Android SDK packages as some licences have not been accepted.
设置正确的sdk路径即可避免:
flutter/packages/flutter_tools/gradle/aar_init_script.gradle
flutter/packages/flutter_tools/gradle/flutter.gradle
将其中的:https://storage.googleapis.com/download.flutter.io 替换为:https://storage.flutter-io.cn/download.flutter.io 后重新编译
android { ndkVersion "21.3.6528147" }
然后再编译即可。然后就可以运行Demo了。
9. 运行结果:转载地址:http://qqtd.baihongyu.com/