简体   繁体   English

Flutter 启动器图标不改变图标

[英]Flutter Launcher icon doesn't change the icon

示例代码

I already type this to my terminal and the icon for my app didn't change我已经在我的终端上输入了这个,我的应用程序的图标没有改变

flutter pub get flutter 酒吧得到

flutter pub run flutter_launcher_icons:main flutter 酒吧运行 flutter_launcher_icons:main

Make sure you've set the app icon path in android/app/src/main/AndroidManifest.xml确保你已经在android/app/src/main/AndroidManifest.xml中设置了应用程序图标路径

 android:icon="@mipmap/ic_launcher" 

Try below code hope its help to you.试试下面的代码希望它对你有帮助。

Add below package in your pubspec.yaml file在您的 pubspec.yaml 文件中添加以下 package

flutter_launcher_icons: ^0.9.2

Add below code pubspec.yaml file添加以下代码 pubspec.yaml 文件

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

then run below command然后运行下面的命令

flutter pub run flutter_launcher_icons:main

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM