0

I recently changed the icon of my app. When I run the app using USB debugging on my phone, everything is fine, the app compiles and the icon is as it should be. But as soon as I try to generate a signed APK, the compilation ends with this error:

A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction

Android resource linking failed C:\Users\Adam\AndroidStudioProjects\Generator\app\build\intermediates\packaged_manifests\release\AndroidManifest.xml:11: error: resource mipmap/ic_launcher not found.

Which is strange because otherwise everything works and the xml file is where it's supposed to be. I created the icons using Image Asset and they generated correctly. The only thing that comes to me as a possible cause is that for ic_launcher there is only an xml file, but ic_launcher_round has a whole folder with png images as well. Also, in the manifest there is a preview of the icon only for the round version, it is not loaded for the regular version:

enter image description here

How can I solve this?

Adam
  • 186
  • 1
  • 4
  • 20

1 Answers1

1

Solved, it was enough to select the icon as res directory: main when confirming the path:

enter image description here

Adam
  • 186
  • 1
  • 4
  • 20
  • hello, i am having thesame error but i cant understand what u said here – Gbenga B Ayannuga Mar 08 '23 at 12:49
  • @GbengaBAyannuga When you open Vector Asset Studio, fill in the "Configure Vector Asset" section and set the Source set: main in the "Confirm Icon Path" section. Follow the same procedure for Image Asset Studio. I also added a picture, hope it helps. – Adam Mar 09 '23 at 13:49