4

After running a flutter app, it gets correctly deployed to an Android Virtual Device.

While in the virtual device, I can notice that the icon chosen for the app shows up correctly among other existing apps.

But, when I tap to see running processes, an Android icon appears at the top of the flutter app window.

Icons were manually added as described here.

How can I change this default icon to use mine?

enter image description here

4 Answers 4

3

Check again your AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.snapio">

<application
    android:name="io.flutter.app.FlutterApplication"
    android:label="flutter"
    android:icon="@mipmap/ic_launcher">

You have to change your icon name inside this file.

Sign up to request clarification or add additional context in comments.

4 Comments

I already have <application ... android:icon="@mipmap/ic_launcher"> set, and the mimap folders have the new icon, so no idea why the emulator shows the default android icon. What do you think it could be the reason? is it missing a specific resolution? My current resolutions are hdpi, mdpi, xhdpi, xxhdpi and xxxhdpi.
Can you try uninstall the app from your phone? Then run it again.
Yes uninstalled and installed again, the same android default icon shows up. This default icon shows up only in the emulator that has an android 10.0 version. In my physical device with android 9.0 the new icon shows up correctly. Since in 9.0 the icon shows up correctly, so maybe it is an issue related to the android 10.0 version.
I have the same problem, shows up correctly in app drawer but not when switching apps.. Uninstall did not help. Also on android 10
3

one of my favorite library that you can use it will generate iOS and android icon for you https://pub.dev/packages/flutter_launcher_icons

Comments

1

For Android 10 you have to provide an adaptive icon for it to show up in the task switcher. More info here: https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive

Comments

1

Change application icon in flutter from pubspec.yaml by setting the flutter_icons tag like this:

flutter_icons:
  android: "launcher_icon"
  ios: true
  image_path: "images/icon/icon.png" # your full path in assets directory

Add flutter_launcher_icons as dev dependency in pubspec.yaml

dev_dependencies:
  flutter_launcher_icons: "^0.9.2"

Finally update dependencies and generate the icons

flutter pub get
flutter pub run flutter_launcher_icons:main

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.