Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 180 Vote(s) - 3.42 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Flutter Launcher icon not getting changed?

#1
Am new to Flutter. I gone through the flutter documentation and followed the steps to configure custom launcher icons for my flutter project but app Launcher icon is not getting changed? Not sure what am missing.

[![enter image description here][1]][1]


[1]:


Code:

dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: "^0.7.0"

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

#2
you have to get the package and then after run following command to change the icon.

$ flutter pub pub run flutter_launcher_icons:main

Reply

#3
Able to change Now after following below Steps.

1. Add flutter_launcher_icons code Plugin to pubspec.yaml as mentioned in question
2. In Command prompt run below commands
- flutter pub get
- **flutter pub pub run flutter_launcher_icons:main**
3. And it worked
4. Launcher Icons I generated using external website

[To see links please register here]



Reply

#4
I wasn't using `flutter_launcher_icons`, I was using just Image Asset Studio in the Android project. It seemed that in certain situations it wasn't updating my Adaptive Icon on Android.

To fix it, I opened the Android module (right click on the `android/` folder in the Flutter view, then select Flutter | Open Android Module in Android Studio). From there, open the `res/` folder and delete everything that looks like `foreground.xml`. AFAICT this is what is generated by Image Asset Studio as part of the Adaptive Icon.

Then recreate the Adaptive Icon via Image Asset Studio.

At this point my Flutter cache was corrupted, so I had to run `flutter pub cache repair` (I mention this because maybe somehow that is what fixed it, but I doubt it). Run the app and then voila, the icon updated.
Reply

#5
there is two way to update app icon

1) first way

dev_dependencies:
flutter_test:
sdk: flutter

flutter_launcher_icons: "^0.7.5"

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

run this two command

flutter pub get

flutter pub run flutter_launcher_icons:main

2) if above not work then below solutions (change in native)


you can change appicon from Image Asset, right click on main folder of your project structure and go new -> Image Asset , now just select your icon and finish it, Android studio will generate all necessary icons for you.

[![here look of Image Asset][1]][1]


[1]:


similarly you can change appicon for ios, go

ios -> Runner -> Assets.xcassets -> Appicon.appiconset

then replace icons with your new icons

that's it!
Reply

#6
For me the folder `drawable-v24` was a problem. After removing `foreground.xml` from there it worked.
Reply

#7
First add flutter_launcher_icons: ^0.8.1 code Plugin to pubspec.yaml

in pubspec.yaml file:

1. flutter_icons:
image_path_android:"images/logoapp.png"
image_path_ios:"images/logoapp.png"
android:true
ios:true

2. check iOS -Folder -> Runner -> Assets.xcassets -> AppIcon.appiconset:
if duplicates exist delete them.

run commands : flutter pub get
run commands : flutter pub pub run flutter_launcher_icons:main
run commands : flutter clean
run commands : flutter run

This worked for me.
Reply

#8
For anyone getting any errors when they try to run `flutter pub pub run flutter_launcher_icons:main`, you may have not added Flutter to PATH. Follow this answer [here][1] to add Flutter to Path.


[1]:

[To see links please register here]

Reply

#9
1. Add **flutter_launcher_icons: ^0.7.3** code Plugin to pubspec.yaml
2. in **pubspec.yaml :**

flutter_icons:
image_path_android: "images/logoapp.png"
image_path_ios: "images/logoapp.png"
android: true
ios: true

3. run command : **flutter pub get**
4. run command : **flutter pub pub run flutter_launcher_icons:main**
5. run command : **flutter clean**
6. run command : **flutter run**

it worked for me
Reply

#10
Those who had faced problems in changing the flutter icon in VS code, go to android/app/build.gradle. Then change the value of the following two properties:

// minSdkVersion 26
// targetSdkVersion 30

Then the same process.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through