skip to Main Content

I’m experiencing an issue with the flutter_launcher_icons package in my Flutter project. While the default Flutter icon seems to be overridden, a black icon appears instead of my custom launcher icon. I’ve followed the steps from this flutter_launcher_icons package is not changing the launcher icons in android after upgrading to the latest flutter version guidance post, but I’m still facing problems.

name: quotncode
description: "A new Flutter project."
publish_to: 'none'

version: 1.0.0+1

environment:
  sdk: ^3.5.3

dependencies:
  flutter:
    sdk: flutter
  cupertino_icons: ^1.0.8
  flutter_native_splash: ^2.4.1
  webview_flutter: ^4.9.0
  webview_flutter_wkwebview: ^3.15.0
  flutter_launcher_icons: ^0.14.1
  webview_flutter_android: ^3.16.7

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_lints: ^4.0.0

flutter_launcher_icons:
  android: true
  ios: true
  remove_alpha_ios: true
  image_path: "assets/icon/icon.png"  # Updated path to my actual icon
  adaptive_icon_background: "#ffffff"
  adaptive_icon_foreground: "assets/icon/icon.png"

flutter_native_splash:
  color: "#ffffff"
  image: assets/icon/icon.png

flutter:
  uses-material-design: true

Path to my icon image:
D:flutterflutter-webviewquotncodequotncodeassetsiconicon.png

Steps I’ve Taken:
Verified that the image exists at the specified path and is a valid image format (PNG).
Ensured the correct configuration in pubspec.yaml.
Ran the command: flutter pub run flutter_launcher_icons:main.
Cleaned the project using flutter clean.
Rebuilt the project.
Observations:
The default Flutter launcher icon is being overridden.
However, a black icon appears instead of my custom launcher icon.
Additional Information:
I’m using Flutter version Flutter 3.24.3.

I’ve tested the app on both an Android emulator and a physical device.

What could be causing this issue? Any suggestions on how to resolve it would be greatly appreciated!

here is overriden some blackcolor icon image screenshot
enter image description here

2

Answers


  1. I had the same issue. I believe there is a bug in flutter_launcher_icons.

    It worked for me after deleting the launcher_icon.xml file in android/app/src/main/res/mipmap-anydpi-v26, which was generated by dart run flutter_launcher_icons.

    Login or Signup to reply.
  2. Downgrade plugin version to 0.13.1 and try again.

      flutter_launcher_icons: ^0.13.1
    

    Problem should be solved, if not checkout this answer and then try again.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search