Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Android: Black app launcher icon #578

Closed
Navid-Rahman opened this issue Sep 22, 2024 · 15 comments · May be fixed by #601
Closed

[BUG] Android: Black app launcher icon #578

Navid-Rahman opened this issue Sep 22, 2024 · 15 comments · May be fixed by #601

Comments

@Navid-Rahman
Copy link

Navid-Rahman commented Sep 22, 2024

I'm using flutter_launcher_icons v0.14.0 to generate app icons for both Android and iOS. Despite providing a colored logo, the generated app icons are black in Android. But in iOS this is working fine.
The logo is correctly formatted as a PNG file, and I've set the necessary configuration in pubspec.yaml, but the output remains incorrect.

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_lints: ^2.0.0
  flutter_launcher_icons: ^0.14.0

flutter_launcher_icons:
  android: "launcher_icon"
  ios: true
  remove_alpha_ios: true
  image_path: "assets/logo/logo.png"
  min_sdk_android: 21

Flutter Doctor result:
Screenshot 2024-09-22 at 1 37 04 PM

Do you know if this is a bug from the latest update? Or am I doing something wrong?

@ShuvamJaswal
Copy link

Icon is a black box?

@Navid-Rahman
Copy link
Author

Screenshot 2024-09-22 at 1 55 20 PM

On Android, the app icon is displaying incorrectly; as you can see in the screenshot. However, on iOS, the correct app icon is shown.

@ShuvamJaswal
Copy link

Facing the same issue. Not sure about IOS but I have a black icon in android.

@MarkOSullivan94
Copy link
Collaborator

I'm using flutter_launcher_icons v0.14.0 to generate app icons for both Android and iOS. Despite providing a colored logo, the generated app icons are black in Android. But in iOS this is working fine. The logo is correctly formatted as a PNG file, and I've set the necessary configuration in pubspec.yaml, but the output remains incorrect.

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_lints: ^2.0.0
  flutter_launcher_icons: ^0.14.0

flutter_launcher_icons:
  android: "launcher_icon"
  ios: true
  remove_alpha_ios: true
  image_path: "assets/logo/logo.png"
  min_sdk_android: 21

Flutter Doctor result: Screenshot 2024-09-22 at 1 37 04 PM

Do you know if this is a bug from the latest update? Or am I doing something wrong?

Does this work fine for v0.13.1?

What Android SDK version are you using?

@MarkOSullivan94 MarkOSullivan94 changed the title [BUG] [BUG] Android: Black icon Sep 22, 2024
@MarkOSullivan94 MarkOSullivan94 changed the title [BUG] Android: Black icon [BUG] Android: Black app launcher icon Sep 22, 2024
@Navid-Rahman
Copy link
Author

Navid-Rahman commented Sep 22, 2024

I noticed an inconsistency between the documentation and the example videos [Though the video is using v0.0.1] regarding the configuration for flutter_launcher_icons. In the example videos, the configuration is shown under flutter_icons, but the official documentation uses flutter_launcher_icons. The configuration didn't work until I switched it to flutter_icons, as mentioned in the videos.

On the video the requirements are mentioned under, flutter_icons:
Screenshot 2024-09-22 at 6 50 53 PM

On the documentation the requirements are mentioned under, flutter_launcher_icons:
Screenshot 2024-09-22 at 6 53 35 PM

The video suggestion worked fine for me.
Screenshot 2024-09-22 at 7 04 12 PM

@Navid-Rahman
Copy link
Author

Navid-Rahman commented Sep 22, 2024

I'm using flutter_launcher_icons v0.14.0 to generate app icons for both Android and iOS. Despite providing a colored logo, the generated app icons are black in Android. But in iOS this is working fine. The logo is correctly formatted as a PNG file, and I've set the necessary configuration in pubspec.yaml, but the output remains incorrect.

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_lints: ^2.0.0
  flutter_launcher_icons: ^0.14.0

flutter_launcher_icons:
  android: "launcher_icon"
  ios: true
  remove_alpha_ios: true
  image_path: "assets/logo/logo.png"
  min_sdk_android: 21

Flutter Doctor result: Screenshot 2024-09-22 at 1 37 04 PM
Do you know if this is a bug from the latest update? Or am I doing something wrong?

Does this work fine for v0.13.1?

What Android SDK version are you using?

I haven't tested this with version 0.13.1 specifically. However, I did use version 0.13.1 in one of my projects a few days ago and did not encounter any issues at that time.

@ShuvamJaswal
Copy link

@MarkOSullivan94 I found the issue in my case, version 1.14.0 is creating a folder mipmap-anydpi-v26 in res folder which contains some sort of xml files, deleting that folder fixed this for me.

@MarkOSullivan94
Copy link
Collaborator

I noticed an inconsistency between the documentation and the example videos [Though the video is using v0.0.1] regarding the configuration for flutter_launcher_icons. In the example videos, the configuration is shown under flutter_icons, but the official documentation uses flutter_launcher_icons. The configuration didn't work until I switched it to flutter_icons, as mentioned in the videos.

On the video the requirements are mentioned under, flutter_icons: Screenshot 2024-09-22 at 6 50 53 PM

On the documentation the requirements are mentioned under, flutter_launcher_icons: Screenshot 2024-09-22 at 6 53 35 PM

The video suggestion worked fine for me. Screenshot 2024-09-22 at 7 04 12 PM

Both flutter_icons and flutter_launcher_icons should work, did you do a flutter clean before flutter pub get?

@Navid-Rahman
Copy link
Author

I noticed an inconsistency between the documentation and the example videos [Though the video is using v0.0.1] regarding the configuration for flutter_launcher_icons. In the example videos, the configuration is shown under flutter_icons, but the official documentation uses flutter_launcher_icons. The configuration didn't work until I switched it to flutter_icons, as mentioned in the videos.
On the video the requirements are mentioned under, flutter_icons: Screenshot 2024-09-22 at 6 50 53 PM
On the documentation the requirements are mentioned under, flutter_launcher_icons: Screenshot 2024-09-22 at 6 53 35 PM
The video suggestion worked fine for me. Screenshot 2024-09-22 at 7 04 12 PM

Both flutter_icons and flutter_launcher_icons should work, did you do a flutter clean before flutter pub get?

Yupp. I tried that also. I even uninstalled the app and then again ran the program.

@rohanots
Copy link

I degraded the package version to this
flutter_launcher_icons: "^0.13.1"
Worked like a charm

@bjmc
Copy link

bjmc commented Sep 29, 2024

Are we sure this issue should be closed? I think I just encountered this glitch. As suggested by @ShuvamJaswal, deleting the mipmap-anydpi-v26 resolved the problem, but it seems like flutter_launcher_icons v0.14.1 is still generating output that breaks the launcher icon on at least some Android devices.

@UMattiaBano
Copy link

Are we sure this issue should be closed? I think I just encountered this glitch. As suggested by @ShuvamJaswal, deleting the mipmap-anydpi-v26 resolved the problem, but it seems like flutter_launcher_icons v0.14.1 is still generating output that breaks the launcher icon on at least some Android devices.

Agree with it, issue still present on Android (I've tried 12 and 14, both have the issue) on 0.14.0 and 0.14.1

@And96
Copy link

And96 commented Oct 3, 2024

Which resolution should we use for this image?
**image_path: "assets/logo/logo.png"**

After last update, my icon become really small. I didnt change anything, same image, just update the package.
With the old version, the icon was twice as large!

@Quardah
Copy link

Quardah commented Oct 12, 2024

@MarkOSullivan94 I found the issue in my case, version 1.14.0 is creating a folder mipmap-anydpi-v26 in res folder which contains some sort of xml files, deleting that folder fixed this for me.

i had this exact same problem with 1.14.1 and found the same answer here : https://stackoverflow.com/questions/79065420/suspected-flutter-launcher-icons-0-14-1-causing-fatal-exception-wmshell-splashw

another issue is since i fixed it now my app icon is stuck with a white outline. i am unsure what caused this but it was not the case before having to delete that folder.

@akpabiojnr01
Copy link

I deleted the mipmap-anydpi-v26 folder that contained an xml file in android/app/src/main/res folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants