[SOLVED] Custom icon for android app

Friends, why is so complicated to change app default icons (at least for me it is) ? I’ve put my icons here:

MyApp\platforms\android\res\drawable
MyApp\platforms\android\res\drawable-hdpi
MyApp\platforms\android\res\drawable-ldpi
MyApp\platforms\android\res\drawable-mdpi
MyApp2\platforms\android\res\drawable-xhdpi

But when I run “ionic run android”, nothing changes, the app is installed with default cordova icons. I’ve already uninstalled the app from my device and tried again… with no success…

I would like to propose a tutorial about this, I see in the “learning page” one about iOS, but there is no one for Android…

If the icons you added are not called icon.png then you need to modify the androidManifest.xml so it looks for the right images.

Hi dangeruponu,
icon files are all called “icon.png”. In AndroidManifest.xml, located in

MyApp\platforms\android

there is the following line:

application android:hardwareAccelerated=“true” android:icon=“@drawable/icon” android:label=“@string/app_name”

So, I guess it’s supposed configured correctly.
I still would like to suggest a tutorial about this. Simple things like default app icon or splash screens aren’t so clear for starters, like me.

Thank you

I know what you mean, I’m fairly new myself. I’ve only been tinkering with mobile for about 2 weeks. Have you tried doing ionic build android then ionic run android? That’s what I always do. I was doing it just last night even.

Hi,

yes, I’m running ionic build android before “run”. To test, I changed my app name in \MyApp\config.xml, executed the “build” and after my app name was updated correctly

I found a solution… I followed this post

But I believe this information should be in tutorial area…

1 Like

But doesn’t that really do the same thing you were doing? It says you can manually copy the images into their right places which is what you were doing (and what I do, but I didn’t have any problems with it).

yeah rsrsrs and I don’t why just copying wasn’t working for me…create the hook worked.

thank you