4

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.

james lebron
  • 109
  • 1
  • 8
  • possible duplicate of [Generating iOS and Android icons in Cordova / PhoneGap](http://stackoverflow.com/questions/23830467/generating-ios-and-android-icons-in-cordova-phonegap) – Dawson Loudon Dec 08 '14 at 05:49
  • I tried so many things it just doesn't work! – james lebron Dec 08 '14 at 06:13
  • Which version of cordova you are using? Now cordova maintains two config.xml file. one at top level and other specific to platform. Make sure you are making changes at top level config.xml. You can refer http://docs.phonegap.com/en/4.0.0/config_ref_images.md.html#Icons%20and%20Splash%20Screens for more details. – Rupesh Dec 08 '14 at 08:22
  • did u created a new logo ? and copied in all drawable folders ? – Dino Dec 09 '14 at 04:52
  • @Dino yes, that won't work? – james lebron Dec 09 '14 at 07:12

3 Answers3

1

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 :

OR

  • You can also use the npm module for Cordova $ cordova-icon which does the same thing with a file called "icon.png" in your app root folder.
    To install 'cordova-icon' simply use $ npm install -g cordova-icon https://www.npmjs.com/package/cordova-icon

For 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)

Kris Randall
  • 686
  • 1
  • 7
  • 12
0

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

Nurdin
  • 23,382
  • 43
  • 130
  • 308
0

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.

Community
  • 1
  • 1
Sebastien Lorber
  • 89,644
  • 67
  • 288
  • 419