Reputation: 109
I tried so many steps but the problem still persist. In AndroidManifest.xml I set my icon in the fields of icon and logo, it still run the default cordova icon.
later I tried to add in config.xml, <icon src="res/drawable/icon.png" />
the problem is still there.
I'm using ionic framework, not sure it's ionic problem or cordova problem. I spend hours finding a solution.
Upvotes: 4
Views: 1792
Reputation: 736
Mobile apps (both iOS and Android) require many different icons; identical but different resolutions. In the past these needed to be manually created and given the correct names - a tedious process.
However it is much easier now :
$ ionic resources --icon
command which will take the file "resources/icon.png" and convert it into all the correct formats and put it in the correct folders for you.OR
$ cordova-icon
which does the same thing with a file called "icon.png" in your app root folder.$ npm install -g cordova-icon
https://www.npmjs.com/package/cordova-iconFor both the ionic resources or the cordova-icon solutions you will need image magic installed :
eg. $ brew install imagemagick
(I don't have enough reputation to post a link to the imagemagick site)
Upvotes: 1
Reputation: 92140
See my FAQ here: https://stackoverflow.com/a/31674547/82609
For Cordova 5.1.1 and Android, the icon declaration does not do anything when used without density. You have to declare all the densities to make it work.
Upvotes: 0
Reputation: 23883
You need to build your project again. Cd
to your project and build
it using command below.
Phonegap: phonegap build android
Cordova: cordova build android
Upvotes: 0