21

My app icon becomes blurry when creating an APK. I tried to download an APK of an Android app that has a very sharp icon and placing it inside of my APK, but I got the same result.

Why does my icon become blurry while I see it very sharp in other app using the same icon?

Of course I used multiple icon size:

  1. ldpi (120 dpi) (Low density screen) 36 x 36 px

  2. mdpi (160dpi)(Medium density screen) 48 x 48 px

  3. hdpi (240 dpi)(Highdensity screen) 72 x 72 px

  4. xhdpi (320 dpi) (Extra-high density screen) 96 x 96 px

but it didn't help. How can I fix it?

Thank you

Dinux
  • 644
  • 1
  • 6
  • 19
Yehonatan Segal
  • 297
  • 1
  • 3
  • 12
  • 2
    Make a high-res image and use that here: http://android-ui-utils.googlecode.com/hg/asset-studio/dist/icons-launcher.html. This will give you all necessary image sizes for the launcher icons. See if this fixes it. I usually make a 512*512 px image. – Siddharth Lele Apr 29 '13 at 05:08
  • The problem is that I took icon.png that is very sharp (I took it from inside of some android application apk that is in the market) and in my apk it went blurry...I don't know if the image size is the issue but still I'll try your tip.. thanks.. still waiting for more answers :) – Yehonatan Segal Apr 29 '13 at 05:22
  • Are you testing on an emulator or on a device? – Siddharth Lele Apr 29 '13 at 05:28
  • On my device (galaxy nexus). – Yehonatan Segal Apr 29 '13 at 05:31
  • 1
    Interesting. I have personally, never seen this happen. Just to check, I fired up a 3.2" emulator. And it looks just fine. How have you created those icons? Manually? You could try the link I put up in the first comment or you could Ctrl + N ||(OR) File -> New -> Other -> Android -> Android Icon Set from Eclipse. – Siddharth Lele Apr 29 '13 at 05:35
  • What happens if you use the default Android icon in you app or if you make a simple test (blank) app - does it blurring still happen? – Tigger Apr 29 '13 at 05:39
  • I found my mistake. I should have known that android:thumbnail is not android:icon, and the thumbnail resolution should be higher (I can't find documentation), thanks! – Yehonatan Segal Apr 29 '13 at 06:03
  • 1
    @YehonatanSegal: Add the problem source and the solution as an answer. Others who might face the same problem will find it helpful. :-) – Siddharth Lele Apr 29 '13 at 06:12

6 Answers6

5

A little late to the party, but if someone searches for this issue, you might want to check if your icons are in /drawable or /mipmap. Latter really bumps the quality up, if you haven't had your launcher icons in there before.

See also:

Community
  • 1
  • 1
peitek
  • 884
  • 2
  • 17
  • 27
4

As all answers suggesting that please check all drawable and mipmap folders but there is something else in my case that I had an extra folder mipmap-anydpi-v26 in which I also have the app icon that icon was creating the problem. So I just simply remove the mipmap-anydpi-v26 folder and after that everything is working fine.

anoop ghildiyal
  • 821
  • 10
  • 18
  • Removing `mipmap-anydpi-v26` folder gives unnecessary white padding around the app icon. I checked in my Pixel 4 emulator. – NullByte08 Oct 09 '21 at 11:12
  • This doesn't look like an ideal solution since mipmap-anydpi-v26 folder is reserved for adaptive icons which is available only in API 26 and above. – Harshal Pudale Apr 20 '22 at 11:20
2

I found my mistake. I should have known that android:thumbnail is not android:icon, and the thumbnail resolution should be higher (I couldn't find documentation),

Yehonatan Segal
  • 297
  • 1
  • 3
  • 12
2

Another reason it may be blurry:

If you are using an xml icon inside drawable, check for the values android:width and android:height, be sure they are large enough (for example: '128dp').

lepe
  • 24,677
  • 9
  • 99
  • 108
1

What works for me was use "density" instead "qualifier" in config.xml icon tag:

<icon density="ldpi" src="www/res/icons/android/drawable-ldpi-icon.png" />
Zoe
  • 27,060
  • 21
  • 118
  • 148
1

If you are getting blurred image while compiling and running from android studio make sure that if you find mipmap-anydp folder delete that!.