Why does getting a custom icon and custom splash screen image have to be so difficult?
I’ve followed every tutorial/instructions on the ionic site and elsewhere to get a custom desktop icon on my android phone for my app, but nothing seems to work.
Here is what I’ve done:
I created an icon.png, size 512x512 and put it the resources/ directory.
I installed cordova-res (which was not easy since this is a capacitor project – why is there no capacitor-res command?). I had to do this to get it installed:
sudo npm install -g cordova-res --unsafe-perm
I run cordova-res
and I see the new icons in the resources/android/icons directory. (I also tried cordova-res android --skip-config --copy
)
I didn’t mess with the splash screen stuff yet because I thought I’d get the first thing working first.
I run my build (ionic build --prod --release && npx cap sync && npx cap open android
)
(do I need to use npx cap copy perhaps?)
My app builds in Android Studio and I install it on my connected phone.
And, the icon is still the same old ionic icon…
There are a bunch of tutorials out there and none of them seem to agree. It sure would be great if the ionic folks made one thorough and maintained page which describes exactly what to do, and how to figure out what is wrong when it doesn’t work.
Can anyone help me? What am I doing wrong?
Thanks.