Cordova icon keeps showing the default icon
I tried so many steps but the problem still persists. In AndroidManifest.xml I set my icon in the icon and logo fields, it still launches the default cordona icon.
later i tried to add to config.xml, <icon src="res/drawable/icon.png" />
problem still exists.
I am using ionic structure, not sure if it is ionic problem or cordova problem. I spend hours finding a solution.
source to share
Mobile apps (both iOS and Android) require many different icons; identical but different resolutions. In the past, they had to be manually created and named correctly - a tedious process.
However, it is now much easier:
- With ionic you can use a command
$ ionic resources --icon
that will take the "resources / icon.png" file and convert it to all the correct formats and place it in the correct folders for you.
http://blog.ionic.io/automating-icons-and-splash-screens/
OR
- You can also use the npm Cordova module
$ cordova-icon
, which does the same with a file named "icon.png" in the root of your application.
To install "cordova-icon" just use$ npm install -g cordova-icon
https://www.npmjs.com/package/cordova-icon
For both ionic resources and cordova sign solutions, you will need image magic:
for example. $ brew install imagemagick
(I don't have enough reputation to post a link to the imagemagick site)
source to share
See my FAQ here: fooobar.com/questions/70815 / ...
For Cordova 5.1.1 and Android, the icon declaration does nothing when used without density. You have to declare all densities to make it work.
source to share