英文:
How to configure iOS icon for Flutter application?
问题
我正在使用 flutter_launcher_icons 来配置我的 Flutter 应用程序的图标。
总体来说,它有效,除了一个问题。iOS 在主屏幕上显示正确的图标,但在运行应用程序时仍然显示标准的 Flutter 图标。
主屏幕:
运行中的应用程序:
我该如何修复它?
我的 pubspec.yaml:
...
dev_dependencies:
flutter_launcher_icons: ^0.13.1
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
integration_test:
sdk: flutter
flutter:
uses-material-design: true
flutter_launcher_icons:
android: true
ios: true
remove_alpha_ios: true
image_path: 'assets/icon/icon.png'
运行 dart run flutter_launcher_icons
后的输出:
════════════════════════════════════════════
FLUTTER LAUNCHER ICONS (v0.13.1)
════════════════════════════════════════════
• 创建默认 Android 图标
• 使用新图标覆盖默认的 Android 启动图标
• 使用新图标覆盖默认的 iOS 启动图标
未提供平台
✓ 成功生成启动图标
英文:
I am using flutter_launcher_icons to configure icons for my Flutter app.
Overall it works except one thing. iOS shows correct icon on home screen, but still shows standard Flutter icon for running application.
Home screen:
Running app:
How can I fix it?
My pubspec.yaml:
...
dev_dependencies:
flutter_launcher_icons: ^0.13.1
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
integration_test:
sdk: flutter
flutter:
uses-material-design: true
flutter_launcher_icons:
android: true
ios: true
remove_alpha_ios: true
image_path: 'assets/icon/icon.png'
Output after running dart run flutter_launcher_icons
:
════════════════════════════════════════════
FLUTTER LAUNCHER ICONS (v0.13.1)
════════════════════════════════════════════
• Creating default icons Android
• Overwriting the default Android launcher icon with a new icon
• Overwriting default iOS launcher icon with new icon
No platform provided
✓ Successfully generated launcher icons
答案1
得分: 1
如果您正在使用模拟器,请删除应用程序并重新安装;如果您正在使用真实设备,重新启动设备将解决此问题。
英文:
If you are using a simulator delete the app and reinstall and if you are using a real device a device reatart will clear this issue.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论