flutter不更新启动器图标
我为我的应用创建了一个新图标,并使用了Flutter Launcher图标来生成启动器图标。 在中图文件夹中,有ic_launcher.png,如果我打开它是我的新启动器图标。 但是,如果我在手机上通过Android Studio安装该应用程序,则会显示旧图标。
即使我创建了第一个图标,这也发生在我身上。 一切顺利,但是该应用具有默认的扑面图标。 当我更改应用程序名称时,它开始显示新版本,但现在我无法再次更改它。
我已经尝试使用Flutter-Launcher-Icons小部件,以使用清洁,ECC ...但不会改变。 为什么有这个问题?该应用在哪里获取旧徽标信息?
更新
我发现了这个问题的解决方法。 如果我删除所有生成的文件(甚至看起来正确的文件),然后在手机上安装应用程序时将它们重新生成,则图标看起来正确。
I created a new icon for my app and I used flutter launcher icons for generate the launcher icon.
In the midmap folders there is the ic_launcher.png and if I open it is my new launcher icon.
But if I install the app via android studio on my phone it shows the old icon.
It happened to me even when I created the first icon.
It went all well but the app had the default flutter icon.
It started to show the new one when I changed the app name but now I cannot change it again.
I already tried with the flutter-launcher-icons widget, to use flutter clean, ecc... but it doesn't change.
Why there is this problem? And where the app takes the old logo information?
UPDATE
I discovered a workaround for this problem.
If I delete all generated files (even the ones that looks right) and then I regenerate them when I install the app on the phone the icon looks right.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Android/app/src/res/主文件夹中将有5个不同的MIPMAP文件。每个MIPMAP均组成不同尺寸和像素的图标启动器。确保使用生成的图标启动器替换了所有5个图标启动器。
您可以从
There will be 5 different mipmap files within android/app/src/res/main folder. Each mipmap consists icon launcher of different dimensions and pixels. Make sure you have replaced all 5 icon launchers with your generated Icon Launcher.
You can Generate Icon Launcher from here.
我看到这个问题仍未得到解决。当我遇到同样的问题时,我确实找到了解决方法。只需添加
您的 pubspec.yaml flutter_icons: ,您可以在其中提及十六进制中任何合适的背景颜色em> Adaptive_icon_background 。
I see this issue still hasn't been resolved. I did find a workaround when I ran into the same problem. Just add
in your pubspec.yaml under flutter_icons: where you can mention any suitable background color in hex for adaptive_icon_background.
我遇到了类似的问题,在该问题中,应用程序图标始终是Android默认问题。我解决的方式是通过查看以下 github线程: https://github.com/flutter/flutter/issues/59305
我注意到,我的androidManifest.xml中存在错误-标签。放置“>”之后Android:Icon =“@mipmap/luncher_icon”之后,它对我有用。
看起来
不起作用
:
i.sstatic.net/yyej4.png“ rel =“ nofollow noreferrer”>工作
我希望这对
I've had a similar problem, where the app icon would always be the androids default one. The way I fixed this, was by looking at the following Github thread: https://github.com/flutter/flutter/issues/59305
I noticed, that there was an error in my AndroidManifest.xml, where the android:icon="@mipmap/launcher_icon" was not inside the application-tag. After placing the ">" after android:icon="@mipmap/launcher_icon", it worked for me.
How it looked:
Not working
How it should look:
Working
I hope this helped