flutter_launcher_icons icon indicating copy to clipboard operation
flutter_launcher_icons copied to clipboard

fix(Android): show blank icon if no adaptive icon set

Open chungxon opened this issue 1 year ago • 2 comments

Fixes #578, #579, #585, #589, #594, #595, #600

In the new version 0.14.1, not everyone specified adaptive_icon_background and adaptive_icon_foreground or adaptive_icon_monochrome in their Android configuration, so the app icon may be black/blank after generating.

As suggested by https://github.com/fluttercommunity/flutter_launcher_icons/issues/579#issuecomment-2370664455, you can delete the android/app/src/main/res/mipmap-anydpi-v26/${androidIconName}.xml file after running generating to solve this issue.

However, it will still always create this file. I think this file should only be created if any configuration related to adaptive icons is set up.

chungxon avatar Oct 13 '24 16:10 chungxon

Hey @OutdatedGuy, could you help take a look at this?

chungxon avatar Oct 13 '24 16:10 chungxon

Can confirm it works. Specifying adaptive_icon_background and adaptive_icon_foreground in either the pubspec.yaml or flutter_launcher_icons.yaml and regenerating the launcher icons via dart run flutter_launcher_icons solves the problem.

mw108 avatar Oct 14 '24 02:10 mw108

Would also fix https://github.com/fluttercommunity/flutter_launcher_icons/issues/613 https://github.com/fluttercommunity/flutter_launcher_icons/issues/611

xShuusui avatar Nov 11 '24 09:11 xShuusui

This is an important fix, I have to delete the falsely generated file every time I want to re-generate my icons. @MarkOSullivan94 could you have a look?

jkoenig134 avatar Jan 17 '25 07:01 jkoenig134

Thank you for this fix @chungxon

Thank you @jkoenig134 for pinging me to get this merged

I'll get another release shipped shortly with this in it and hopefully this will help you @jkoenig134

MarkOSullivan94 avatar Jan 17 '25 14:01 MarkOSullivan94

@MarkOSullivan94 thank you! This will close so many issues here 🎉

jkoenig134 avatar Jan 17 '25 15:01 jkoenig134

@jkoenig134 published v0.14.3 - should be available in the next 10 minutes or so

MarkOSullivan94 avatar Jan 17 '25 15:01 MarkOSullivan94

Thanks everyone for bringing the issues to my attention which this PR fixes, if I've missed any please reply and let me know which ones

MarkOSullivan94 avatar Jan 17 '25 15:01 MarkOSullivan94