fix(Android): show blank icon if no adaptive icon set
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.
Hey @OutdatedGuy, could you help take a look at this?
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.
Would also fix https://github.com/fluttercommunity/flutter_launcher_icons/issues/613 https://github.com/fluttercommunity/flutter_launcher_icons/issues/611
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?
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 thank you! This will close so many issues here 🎉
@jkoenig134 published v0.14.3 - should be available in the next 10 minutes or so
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