6
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     E:\Programs\Flutter\<My_APP>\build\app\intermediates\packaged_manifests\debug\AndroidManifest.xml:16: AAPT: error: resource mipmap/ic_launcher (aka com.example.<My_APP>:mipmap/ic_launcher) not found.

I try to removing icon from android manifest file it works but, I want flutter ic_launcher. Any idea, what is the cause ?

JuniorBOMB
  • 336
  • 1
  • 3
  • 11

5 Answers5

8

In case you've switched your app icon not only in terms of the image but also the name of it then you also need to change the icon name in the AndroidManifest.xml.

android:icon="@mipmap/'Your icon_name'">
André
  • 81
  • 1
  • 2
5

It happent because your launcer icon name and android_manifest icon name different.

  1. first of all goto .....\android\app\src\main\res\mipmap-hdpi
  2. then check the name of your icon is it is ic_launcer
  3. then go to android>app>src>AndroidManifest.xml
  4. Change android:icon="@mipmap/your_icon_name"
Azizur Rahaman
  • 181
  • 2
  • 5
3

it clearly says icon not found you need to either change name or rename your existing icon as ic_launcher

Saurabh Dhage
  • 1,478
  • 5
  • 17
  • 31
  • 1
    in my case androidmainfest and mipmap folder name was different that's why this happened when I change the name in androidmainfest then error was removed. thanks – Talha Iqbal Nov 22 '22 at 14:56
1

I reinstall flutter and now it's works

JuniorBOMB
  • 336
  • 1
  • 3
  • 11
0

This error occurs when you generate app icon from app icon generator website so there is a file name by default such as ic_launcher.png as shown below . So remains it as it is. when you change it name there will be other changes becomes required in VS Code etc. So leave its by default name ,lets try!!!