Define "not working".
Also -- for iOS you need far more icons than just one. See the PhoneGap Build documentation.
That is just the start of the icon definitions that you need to include. Please see the PhoneGap Build documentation for a complete list of icons (Icons and Splash | PhoneGap Docs ). You will also need to include splash screens as well.
OK I tried whats in the doc and just did the build for Android but I still do not see the app Icon that I supply show up for the app when i test on a Galaxy S7. Here are the lines in my config.xml
I used http://makeappicon.com/ to make the icons so I suppose the sizes are correct.
<!-- Default icon if others don't work -->
<icon src="icon.png" />
<!-- Android specific icons -->
<icon src="res/icon/android/ldpi.png" platform="android" qualifier="ldpi" />
<icon src="res/icon/android/mdpi.png" platform="android" qualifier="mdpi" />
<icon src="res/icon/android/hdpi.png" platform="android" qualifier="hdpi" />
<icon src="res/icon/android/xhdpi.png" platform="android" qualifier="xhdpi" />
<icon src="res/icon/android/xxhdpi.png" platform="android" qualifier="xxhdpi" />
<!-- <icon src="res/icon/android/fr-xxhdpi.png" platform="android" qualifier="fr-xxhdpi" -->
Make sure you delete the app on-device before you install the new build. Icons and splashes have been known to be cached by the system.
Also make sure you have the correct path, for PhoneGap Build, the icons still need to be within the www folder and included in the zip you send to PGB.
Which one is correct for where to put icons and how to name them for PGB???...
One recommends structure of ...
The other (requires?) structure of ...
If you are building with PGB, it doesn't matter. Phonegap Build only requires that index.html, config.xml and icon.png are in the root directory of the zip file (or Github structure) that you are uploading. Everything else is up to you.
So, you may have:
Of course, all references in html documents and config.xml must be relative, and they should refer to the proper paths in your structure.
I think the biggest issue was that PGB will not recognize the icons, or app name or plugins if they are added as changes to an existing app. Once I made a whole new app using the said data all got incorporated correctly. I don't remember seeing that being said in the documentation... it really should be added! Or change PGB to look for changes in the config and apply them.
Just for completeness this is the icon structure that I used and now works according to your recommendation, Chris.
<!-- application icons for Android -->
<icon src="www/img/ldpi.png" platform="android" qualifier="ldpi" />
<icon src="www/img/mdpi.png" platform="android" qualifier="mdpi" />
<icon src="www/img/hdpi.png" platform="android" qualifier="hdpi" />
<icon src="www/img/xhdpi.png" platform="android" qualifier="xhdpi" />
<icon src="www/img/xxhdpi.png" platform="android" qualifier="xxhdpi" />
Though I tried the same over using Cordova CLi and that icon structure does not work there. Should it??
The project structures for PGB and the CLI can be different, so whether or not you could use the CLI with your project depends upon your directory structure.
I found the same issue when I build with the current version the Launcher Icons are white PNGs. I had to go back to cli-6.1.0