fluttercommunity / flutter_launcher_icons

Flutter Launcher Icons - A package which simplifies the task of updating your Flutter app's launcher icon. Fully flexible, allowing you to choose what platform you wish to update the launcher icon for and if you want, the option to keep your old launcher icon in case you want to revert back sometime in the future. Maintainer: @MarkOSullivan94
https://pub.dev/packages/flutter_launcher_icons
MIT License
2k stars 403 forks source link

In Android I See only a black Circle as icon #600

Open agorji79 opened 3 days ago

agorji79 commented 3 days ago

:information_source: Info

Flutter 3.24.1 • channel stable • https://github.com/flutter/flutter.git Framework • revision 5874a72aa4 (8 weeks ago) • 2024-08-20 16:46:00 -0500 Engine • revision c9b9d5780d Tools • Dart 3.5.1 • DevTools 2.37.2

:speech_balloon: Description

Hello,

For IOS works every thing with the icon as I expect. But for android I see a black Circle in the Simulator (Pixel_3a_API_34_extension_level_7_arm64_v8a and Medium Phone API 34).

How can I fix it?

:scroll: flutter_launcher_icons.yaml

dev_dependencies:
  flutter_launcher_icons: "^0.14.1"

# flutter pub run flutter_launcher_icons
flutter_launcher_icons:
  image_path: "assets/icon/Ronaldo_icon_1.png"
  image_path_android: "assets/icon/Ronaldo_icon_1.png"
  image_path_ios: "assets/icon/Ronaldo_icon_1.png"

  remove_alpha_ios: true
  background_color_ios: "#ffffff"

  android: "launcher_icon"
  # image_path_android: "assets/icon/icon.png"
  min_sdk_android: 21 # android min sdk min:16, default 21
  # adaptive_icon_background: "assets/icon/background.png"
  # adaptive_icon_foreground: "assets/icon/foreground.png"
  # adaptive_icon_monochrome: "assets/icon/monochrome.png"

  ios: true
  # image_path_ios: "assets/icon/icon.png"
  remove_alpha_channel_ios: true
  # image_path_ios_dark_transparent: "assets/icon/icon_dark.png"
  # image_path_ios_tinted_grayscale: "assets/icon/icon_tinted.png"
  # desaturate_tinted_to_grayscale_ios: true

  web:
    generate: true
    image_path: "assets/icon/Ronaldo_icon_1.png"

    background_color: "#hexcode"
    theme_color: "#hexcode"

  windows:
    generate: true
    image_path: "assets/icon/Ronaldo_icon_1.png"
    icon_size: 48 # min:48, max:256, default: 48

  macos:
    generate: true
    image_path: "assets/icon/Ronaldo_icon_1.png"

:scroll: Pubspec.yaml

name: my_try_1
description: "An App for my son, Sam Gorji"
publish_to: 'none'
version: 0.1.0

environment:
  sdk: '>=3.4.4 <4.0.0'

dependencies:
  flutter:
    sdk: flutter
  #flutter pub add material_design_icons_flutter
  flutter_launcher_icons: ^0.14.1
  material_design_icons_flutter: ^7.0.7296

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_lints: ^3.0.0

flutter:
  uses-material-design: true

flutter_icons:
  image_path_android: "assets/icon/Ronaldo_icon_1.png"
  image_path_ios: "assets/icon/Ronaldo_icon_1.png"
  android: true
  ios: true
  image_path: "assets/icon/Ronaldo_icon_1.png"

After installing I see this output:


$ flutter pub get
dart run flutter_launcher_icons
Resolving dependencies... 
Downloading packages... 
  collection 1.18.0 (1.19.0 available)
  flutter_lints 3.0.2 (5.0.0 available)
  leak_tracker 10.0.5 (10.0.7 available)
  leak_tracker_flutter_testing 3.0.5 (3.0.8 available)
  lints 3.0.0 (5.1.0 available)
  material_color_utilities 0.11.1 (0.12.0 available)
  meta 1.15.0 (1.16.0 available)
  stack_trace 1.11.1 (1.12.0 available)
  string_scanner 1.2.0 (1.3.0 available)
  test_api 0.7.2 (0.7.3 available)
  vm_service 14.2.5 (14.3.0 available)
Got dependencies!
11 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Building package executable... 
Built flutter_launcher_icons:flutter_launcher_icons.
  ════════════════════════════════════════════
     FLUTTER LAUNCHER ICONS (v0.14.1)                               
  ════════════════════════════════════════════

• Creating default icons Android
• Adding a new Android launcher icon
• Creating mipmap xml file Android
• Overwriting default iOS launcher icon with new icon
Creating Icons for Web...              done
Creating Icons for Windows...          done
Creating Icons for MacOS...            done

✓ Successfully generated launcher icons
shaheer-hybreed commented 2 days ago

Here also same

adham-ashraf77 commented 2 days ago

Here also same

BenSalemOumaima commented 2 days ago

same problem

modyflutter commented 2 days ago

same problem flutter 3.24.1 stable

modyflutter commented 2 days ago

problem fixed after downgrade package to 0.13.1 flutter_launcher_icons: ^0.13.1 my file looks like

dev_dependencies:
  flutter_launcher_icons: "^0.13.1"

flutter_launcher_icons:
  android: "launcher_icon"
  ios: true
  image_path: "assets/img/icon.png"
  min_sdk_android: 21 # android min sdk min:16, default 21
  web:
    generate: false
    image_path: "path/to/image.png"
    background_color: "#hexcode"
    theme_color: "#hexcode"
  windows:
    generate: false
    image_path: "path/to/image.png"
    icon_size: 48 # min:48, max:256, default: 48
  macos:
    generate: false
    image_path: "path/to/image.png"

you need to run

flutter pub get
dart run flutter_launcher_icons
Bow-T commented 2 days ago

Same problem

Sarvesh223 commented 2 days ago

same problem

WhistlerChoi commented 2 days ago

Solved) If you declare adaptive_icon_background, adaptive_icon_foreground, the icons will be created as normal.

DaliaPinto23 commented 1 day ago

Same problem using flutter 3.24.3

DaliaPinto23 commented 1 day ago

Solved) If you declare adaptive_icon_background, adaptive_icon_foreground, the icons will be created as normal.

It solved my problem, thank you

FahimHoque commented 1 day ago

Solved) If you declare adaptive_icon_background, adaptive_icon_foreground, the icons will be created as normal.

This solved the issue. downgrading to 0.13.1 did not help in my case

agorji79 commented 14 hours ago

Solved) If you declare adaptive_icon_background, adaptive_icon_foreground, the icons will be created as normal.

Thank you @WhistlerChoi! It solved my problem too..