-
Notifications
You must be signed in to change notification settings - Fork 404
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
配置后安装app 图标是一个黑块 #625
Comments
这是执行dart run flutter_launcher_icons:generate命令生成的文件, flutter pub run flutter_launcher_iconsflutter_launcher_icons: 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: trueweb: windows: macos: |
@BenVercammen 这个问题是不是我操作出来的,还是这个插件的bug? |
我也遇到了同样的问题,手机桌面图标是纯黑色一块 |
已解决,使用命令生成图标后吗,多了个mipmap-anydpi-v26 目录,删掉即可 |
ℹ️ Info
flutter_launcher_icons: ^0.14.2
💬 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: 生成配置文件执行命令
LOG:
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: 生成图标执行命令
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
⚠️ PathNotFoundException: Cannot open file, path = './path/to/image.png' (OS Error: No such file or directory, errno = 2)
⚠️ ./path/to/image.png this file or folder is required to generate web icons
⚠️ Requirements failed for platform Windows. Skipped
⚠️ PathNotFoundException: Cannot open file, path = './path/to/image.png' (OS Error: No such file or directory, errno = 2)
Creating Icons for Web...
Creating Icons for Windows...
Creating Icons for MacOS...
✓ Successfully generated launcher icons
📜 Pubspec.yaml
The text was updated successfully, but these errors were encountered: