赞
踩
https://www.digitalocean.com/community/tutorials/flutter-app-icons
https://pub.dev/packages/flutter_launcher_icons
一、编辑pubspec.yaml,更新dev_dependencies:
dev_dependencies:
flutter_launcher_icons: ^0.7.4
二、运行依赖更新命令(或点击Android Studio界面右上方的pub get命令)
flutter pub get
三、配置启动图标,(根据配置路径创建相应的目录与png文件)
flutter_icons:
image_path: 'assets/images/icon.png'
android: true
ios: true
// 或
flutter_icons:
image_path_ios: 'assets/images/heal.png'
image_path_android: 'assets/images/heal.png'
android: true
ios: true
四、运行命令生成图标
flutter pub run flutter_launcher_icons:main
五、运行仿真器或打包应用
打包过程参看:https://flutter.dev/docs/deployment/android
打包命令:
flutter build apk --split-per-abi
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。