Recent

Author Topic: [SOLVED] Icon is not displayed in the apk  (Read 313 times)

spacepascal

  • Newbie
  • Posts: 5
[SOLVED] Icon is not displayed in the apk
« on: September 25, 2024, 10:00:39 pm »
I'm using LAMW4 For Linux based on Lazarus 2.02 r64642 (Debian 12).The IDE works very well, but the only issue is with the icon loading. I select the icon file correctly, but the compiled .apk doesn't show an icon. I'm getting desperate, actually. Do you have some ways to manually fix this bug? I've also tried using an APK icon editor, but it seems that the icon is correctly there, yet when I install the APK, the default android icon is displayed. I've tried the APK on both Android 13 and Android 10.

I have also followed other topic like this https://forum.lazarus.freepascal.org/index.php/topic,63427.0.html, but it did not solve the problem

Here there is the project folder minus some unnecessary big files (i think). I also included the debug APK to provide more context.

https://drive.proton.me/urls/FB3W7GB2D0#OrhecF2cNYqm
« Last Edit: September 26, 2024, 04:58:34 pm by spacepascal »

dseligo

  • Hero Member
  • *****
  • Posts: 1393
Re: Icon is not displayed in the apk
« Reply #1 on: September 25, 2024, 11:44:18 pm »
I created icons with this generator: https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html#foreground.type=image&foreground.space.trim=1&foreground.space.pad=0.25&foreColor=rgba(233%2C%2030%2C%2099%2C%200)&backColor=rgb(237%2C%20237%2C%20237)&crop=0&backgroundShape=circle&effects=none&name=ic_launcher

Then I put icons in following directories:
- 192x192 into mipmap-xxxhdpi
- 144x144 into mipmap-xxhdpi
- 96x96 into mipmap-xhdpi
- 48x48 into mipmap-mdpi
- 72x72 into mipmap-hdpi

HTH.

spacepascal

  • Newbie
  • Posts: 5
Re: [SOLVED] Icon is not displayed in the apk
« Reply #2 on: September 26, 2024, 05:03:07 pm »
I tried to do the same thing by changing the icons in the folders, but it didn't work. With that generator, it worked, it writes something in the mipmap-anydpi-v26 folder. I'll try to figure out how it does it, thanks you're a hero!

 

TinyPortal © 2005-2018