[英]Flutter Android launcher icon looks very small
I'm using the flutter_launcher_icons package to generate launcher icons for both Android and iOS.我正在使用 flutter_launcher_icons package 为 Android 和 iOS 生成启动器图标。 Everything looks great on iOS, but on Android the icon looks very tiny: iOS 上的一切看起来都很棒,但在 Android 上,图标看起来非常小:
It's the second one from the left.这是从左边数第二个。 I've tried all kinds of things to get it to be bigger.我已经尝试了各种方法来让它变得更大。 I've tried several different source images to generate the icon, 512x512 and 900x900, but no matter what I do I can't get it to generate an icon as large as the others.我尝试了几种不同的源图像来生成图标,512x512 和 900x900,但无论我做什么,我都无法生成与其他图标一样大的图标。 I'm sure I'm missing something stupid here.我确定我在这里遗漏了一些愚蠢的东西。 This is my flutter_launcher_icons config:这是我的 flutter_launcher_icons 配置:
flutter_icons:
android: true
ios: true
image_path: "assets/icon/icon_new2.png"
I would recommend you to use http://romannurik.github.io/AndroidAssetStudio/icons-launcher.html to generate your launcher icon: you'll be able to reduce padding to get an icon as big as possible.我建议您使用http://romannurik.github.io/AndroidAssetStudio/icons-launcher.html 尽可能大地生成您的启动器图标以生成图标When you hit download, this will generate a zip archive containing a res
folder with a subfolder for each size.当您点击下载时,这将生成一个 zip 存档,其中包含一个res
文件夹,每个大小都有一个子文件夹。
Let's then put manually the Android launcher icon: In your config, put android: false
so the flutter_launcher_icons
plugins stops generating icons for android, and paste your generated subfolders in yourproject/android/res
然后让我们手动放置 Android 启动器图标:在您的配置中,放置android: false
以便flutter_launcher_icons
插件停止为 android yourproject/android/res
生成图标,并将您生成的子文件夹粘贴到
I encountered the same issue as you, looks like we followed the same tutorials/links.我遇到了和你一样的问题,看起来我们遵循了相同的教程/链接。
EDIT: If you still encounter issues, this thread may help you (almost a duplicate) App Icon on Device is too small编辑:如果您仍然遇到问题,此线程可能会帮助您(几乎是重复的) 设备上的应用程序图标太小
For all the flutter android projects, for those who are still facing issues after generating icons from here, http://romannurik.github.io/AndroidAssetStudio/icons-launcher.html follow the below steps, For all the flutter android projects, for those who are still facing issues after generating icons from here, http://romannurik.github.io/AndroidAssetStudio/icons-launcher.html follow the below steps,
Once the launcher icons are created, build your apk or app bundle asusual from your flutter project.创建启动器图标后,从您的 flutter 项目照常构建您的 apk 或应用程序包。 It should work fine now.它现在应该可以正常工作了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.