Change all res images of my icon, then run “ionic android build” to generate APK but the icon does not change. The same happens when I add some element to string.xml, change the name of my app but does not change the install.
Hey there. So you’re running ionic [prepare/build] android
but nothing is getting updated. Are you putting the icons in the platform/android/res/[proper density] folder?
Yes, the new icon is in each corresponding folder. but no changes
Hmm, it could try this?
$ platform/android/cordova/clean
this will clean the project and hopefully update everything
@sioesi
How are changing icon image??
First build the code then replace drawable folder icon image with existing image name and dimension …
@mhartington as I can run it on windows? cmd??
@shashikant In platform -> android -> res -> drawable folders and all their dimensions.
Have you tried writing a cordova hook for copying the icons ?
I remember facing similar issue in cordova 3.2 + and the third hook in this post helped me http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/
Just try this if nothing works!!
How to Add Icons to Your Ionic Framework Apps
how To Add Icon And splash image to your APP
- Put your (icon.png and splash.png) images to “\resources\android” or “\resources\ios”
- Run command ionic resources
- copy ALL folder from “\res” directory and Paste to “platforms\android\res” or “platforms\android\res”
- Build Your App
hello @divyeshjagatiya , your soulution its work for me…
thanks
Hi there , I faced the same problem with you all . the solution for me happen to be
first create splash.png(2208 x 2208 px ) and icon.png (1000 x 1000 px) in resources directory
second run the command ionic cordova resources in cli
third compare the directory resources and platforms/android(ios)/res directory content , here the automatic conversion of the file sizes was not working properly. so i had to manually copy paste the resource directory splash screen and icon images to platforms/android(ios)/res with there respective sizes .
fourth run ionic cordova run android in cli
strong textfifth delete any installation on your device(mobile phone) then deploy the app or copy paste from the directory platforms\android\build\outputs\apk
-Good Luck