flutter_launcher_icons icon indicating copy to clipboard operation
flutter_launcher_icons copied to clipboard

app icon not display black display #Android 15

Open raviajadiya opened this issue 1 year ago • 16 comments

:information_source: Info

:speech_balloon: Description

:scroll: Pubspec.yaml

flutter_launcher_icons: flutter_launcher_icons: ^0.14.2
  android: 
  ios: 
  image_path: 

raviajadiya avatar Dec 08 '24 04:12 raviajadiya

I have the same issue. the icon is black on the emulator and APK failed to install on the physical device

arslan8t8 avatar Dec 08 '24 11:12 arslan8t8

I have the same problem. My package version: 0.14.2

furknataman avatar Dec 08 '24 15:12 furknataman

same issue on android 14

gm6534 avatar Dec 08 '24 18:12 gm6534

✅ Possible solution :

it worked for me by adding adaptive_icon_background, adaptive_icon_foreground Example :

android: true
ios: true
image_path: "assets/images/icon.png"
adaptive_icon_background: "#ffffff"
adaptive_icon_foreground: "assets/images/icon.png"

❗️check your image path and change it.

belabiedredouane avatar Dec 08 '24 20:12 belabiedredouane

ℹ️ Info

💬 Description

📜 Pubspec.yaml

flutter_launcher_icons: flutter_launcher_icons: ^0.14.2
  android: 
  ios: 
  image_path: 

it worked for me by adding adaptive_icon_background, adaptive_icon_foreground Example :

android: true ios: true image_path: "assets/images/icon.png" adaptive_icon_background: "#ffffff" adaptive_icon_foreground: "assets/images/icon.png"

check your image path and change it.

That works... 🙏 This is a critical bug and must be mentioned in the documentation on pub.dev.

arslan8t8 avatar Dec 08 '24 20:12 arslan8t8

ℹ️ Info

💬 Description

📜 Pubspec.yaml

flutter_launcher_icons: flutter_launcher_icons: ^0.14.2
  android: 
  ios: 
  image_path: 

it worked for me by adding adaptive_icon_background, adaptive_icon_foreground Example :

android: true ios: true image_path: "assets/images/icon.png" adaptive_icon_background: "#ffffff" adaptive_icon_foreground: "assets/images/icon.png"

check your image path and change it.

OMG you're a life saver! They definitely must address this on the official documentation.

Reasondro avatar Dec 09 '24 02:12 Reasondro

This is a critical bug and must be mentioned in the documentation on pub.dev.

Agree. +1.

pqt-dev avatar Dec 14 '24 07:12 pqt-dev

Same issue here. I have tried the workaround and got no success.

andreclinio avatar Dec 16 '24 13:12 andreclinio

Solution:

If the adaptive_background does not work for you

Delete the file

*-anydpi-v26/[launcher].xml

E.g

android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

harrowmykel avatar Dec 16 '24 21:12 harrowmykel

Same issue here. I have tried the workaround and got no success.

Check my latest reply

harrowmykel avatar Dec 16 '24 21:12 harrowmykel

Deleting the file made me happy again! Thanks! 😄

andreclinio avatar Dec 17 '24 20:12 andreclinio

This works for me

   flutter_launcher_icons: ^0.14.2
flutter_launcher_icons:
  android: true
  ios: true
  remove_alpha_ios: true
  image_path: "assets/images/icon.png"
  adaptive_icon_background: "#ffffff"
  adaptive_icon_foreground: "assets/images/icon.png"
  min_sdk_android: 21

Don't forget to run again dart run flutter_launcher_icons

gourav6m17 avatar Dec 20 '24 13:12 gourav6m17

Works for me...!

Add Android Adaptive Icon

  adaptive_icon_background: "#ffffff" # Background color for the adaptive icon
  adaptive_icon_foreground: "assets/images/launcher_icon.png" # Foreground image for the adaptive icon

image

Re-Generate

flutter pub run flutter_launcher_icons:generate

musabibnusiraj avatar Dec 23 '24 10:12 musabibnusiraj

Solution:

If the adaptive_background does not work for you

Delete the file

*-anydpi-v26/[launcher].xml

E.g

android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

Work for me, you save my night, thank you so much

DucThu-Dev avatar Jan 14 '25 15:01 DucThu-Dev

✅ Possible solution :

it worked for me by adding adaptive_icon_background, adaptive_icon_foreground Example :

android: true
ios: true
image_path: "assets/images/icon.png"
adaptive_icon_background: "#ffffff"
adaptive_icon_foreground: "assets/images/icon.png"

❗️check your image path and change it.

Work for me <3

Pbja44 avatar Jan 14 '25 18:01 Pbja44

still have the black icon, even after changed pubspec.yaml to :

flutter_launcher_icons:
  android: true
  ios: false
  image_path: "assets/icon/icon.png"
  min_sdk_android: 21 # android min sdk min:16, default 21
  adaptive_icon_background: "#ffffff"
  adaptive_icon_foreground: "assets/icon/icon.png"

and deleted *-anydpi-v26/[launcher].xml ...

flutter clean, then

dart run flutter_launcher_icons:generate --override

and

flutter pub run flutter_launcher_icons

uninstall from device, reinstall, black icon...

EDIT fixed : the xml file must be deleted AFTER any command, then you can rerun, the icon is ok now

EParisot avatar Jan 26 '25 13:01 EParisot