Flutter命令行
检测flutter项目配置
flutter doctor
检测flutter项目配置并且查看相应的版本信息
flutter doctor -v
创建项目
简单
flutter create myapp
带参数创建
flutter create --org com.xxx.xxx –i swift –a kotlin flutter_demo
运行项目
Debug运行
flutter run
项目打包
打包
flutter build apk
生成 app bundle, run:
flutter build appbundle --target-platform android-arm,android-arm64,android-x64
更多关于: https://developer.android.com/guide/app-bundle
生成单独ABI的APK run:
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
更多关于:https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
当前版本
Flutter 1.12.13+hotfix.7 • channel stable • https://github.com/flutter/flutter.git
默认debug打包和release打包对比
release
debug
设置buildTypes中release打包
buildTypes {
release {
signingConfig signingConfigs.debug
ndk {
abiFilters "armeabi-v7a"
}
}
}