fluttercommunity / fluttercommunity/flutter_launcher_icons

配置后安装app 图标是一个黑块

Open
#625 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Dart
Stars
2.1k
Forks
426
PR merge metrics
No merged PRs in 30d

Description

### :information_source: Info

flutter_launcher_icons: ^0.14.2

### :speech_balloon: Description

step1 :
在pubspec.yaml 文件中添加 flutter_launcher_icons: ^0.14.2 然后执行 flutter pub get
step2:
在pubspec.yaml 文件中添加配置flutter_launcher_icons 配置信息如下:
flutter_launcher_icons:
android: "launcher_icon"
ios: true
image_path: "assets/icon/icon.png"
min_sdk_android: 21
remove_alpha_ios: true
step3: 生成配置文件执行命令

dart run flutter_launcher_icons:generate

LOG:

ly@LYdeMacBook-Pro-2 mydemo5 % dart run flutter_launcher_icons:generate
Building package executable...
Built flutter_launcher_icons:generate.
════════════════════════════════════════════
FLUTTER LAUNCHER ICONS (v0.14.2)
════════════════════════════════════════════

Config file generated successfully 🎉
You can now use this new config file by using the command below:

flutter pub run flutter_launcher_icons

step4: 生成图标执行命令

flutter pub run flutter_launcher_icons

LOG:

LYdeMacBook-Pro-2 mydemo5 % dart run flutter_launcher_icons
Building package executable...
Built flutter_launcher_icons:flutter_launcher_icons.
════════════════════════════════════════════
FLUTTER LAUNCHER ICONS (v0.14.2)
════════════════════════════════════════════

• Creating default icons Android
• Adding a new Android launcher icon
• Creating mipmap xml file Android

WARNING: Icons with alpha channel are not allowed in the Apple App Store.
Set "remove_alpha_ios: true" to remove it.

• Overwriting default iOS launcher icon with new icon
Creating Icons for Web...
⚠️PathNotFoundException: Cannot open file, path = './path/to/image.png' (OS Error: No such file or directory, errno = 2)
Creating Icons for Windows...
⚠️./path/to/image.png this file or folder is required to generate web icons
⚠️Requirements failed for platform Windows. Skipped
Creating Icons for MacOS...
⚠️PathNotFoundException: Cannot open file, path = './path/to/image.png' (OS Error: No such file or directory, errno = 2)

✓ Successfully generated launcher icons


### :scroll: Pubspec.yaml

```yaml
flutter_launcher_icons:
android: "launcher_icon"
ios: true
image_path: "assets/icon/icon.png"
min_sdk_android: 21
remove_alpha_ios: true
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the pubspec.yaml configuration and the provided image at assets/icon/icon.png, then reproduce the issue using dart run flutter_launcher_icons:generate followed by dart run flutter_launcher_icons. Check the generated Android and iOS icons on a device or emulator, and confirm the result is no longer a black block while recording which platform and image conditions trigger it.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.