5

I am trying to add a launcher icon to my Android application, but something seems wrong with resolution whan app is installed. The device I'm working with has an XHDPI screen, so I am testing with a 96x96 (px) image. I used the Image Asset in Android Studio to generate a default icon:

XHDPI (96x96) icon

This is the result in my device: enter image description here

You can notice that the image is a bit blurry, as it has been resized. It happens with every icon I make. What is happening? I am using MIUI, altough it doesn't appears to affect to the other icons.

EDIT: My launcher icon is inside the mipmap folder.

sysseon
  • 177
  • 3
  • 14
  • Possible duplicate of [Android application icon goes blurry](http://stackoverflow.com/questions/16271491/android-application-icon-goes-blurry) – Drew Szurko Feb 21 '17 at 15:48
  • I suppose the generated icons are stored in the drawable folder rather than the mipmap one. You should switch to the latter one if that's the case. – AlphaQ Feb 21 '17 at 16:24
  • I have edited my post. The icon is already stored in the mipmap folder. – sysseon Feb 21 '17 at 23:14

3 Answers3

2

Remove Your file from mipmap-anydp-v26 folder.. it might work for you like me

Muhaiminur Rahman
  • 3,066
  • 20
  • 27
0

Place your launcher icons in the mipmap folders instead of drawable. Some phones scale launcher icons up. Putting you launch icons in mipmap folders will have the phone use a large resolution icon if needed.

mipmap vs drawable folders

Trent Bennett
  • 66
  • 1
  • 3
  • My launcher icon is in the mipmap folder (which is one of the solutions proposed in the other post suggested as duplicated), so I don't think this is the problem... By the way, I created a default project with Android Studio and extracted the icon (in the mipmap folder, yes). If I include it in my app, everything works fine, but if I modify the PNG files beyond the icon padding, I get blurry icon again. Very weird... – sysseon Feb 21 '17 at 23:05
-2

If it is a PNG file try using a vector image

Alex Marks
  • 66
  • 7
  • https://stackoverflow.com/questions/35912428/android-vector-drawable-for-launcher-icon-and-other-images-on-android-n – juztcode Feb 11 '20 at 06:13