Error: Source Path does not exist for android icon png when building for ionic

[cordova-res] error: missing source image for "icon"
ionic resources
android icon source
ionic cordova resource android
how to remove android platform in ionic
ionic cordova add platform android version
cordova-res was not found on your path please install it globally
ionic 4 change app icon
Your system information:

Cordova CLI: 6.5.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
OS: macOS Sierra
Node Version: v6.9.5
Xcode version: Xcode 8.2.1 Build version 8C1002

I am trying to use ionic platform add android to create an android project, but it always complains that resources/android/icon/drawable-hdpi-icon.png does not exist. In fact it doesn't -- none of these resources exist. They can get created by ionic resources.

However if I try to run ionic resources without the platform, I am told to add the platform first. This leads me to essentially do something like:

ionic platform add android
ionic resources
ionic platform rm android
ionic platform add android

Then it works properly. Is there anything I can do to make sure the resources get properly built or referenced before adding the platform?

For me, in config.xml, path had backward slash in tag, changed it from:

<icon src="resources\android\icon\drawable-xhdpi-icon.png" />

to:

<icon src="resources/android/icon/drawable-xhdpi-icon.png" />

ionic cordova build ios gives Error: Source path does not exist , ionic cordova build ios gives Error: Source path does not exist: Source path does not exist: resources\android\icon\drawable-xhdpi-icon.png  Clash Royale CLAN TAG #URR8PPP Error: Source Path does not exist for android icon png when building for ionic Your system information: Cord

This actually had to do with my configuration. If you don't specify the platform in your configuration, platform add will create one for you. This automatically includes paths to resources that may not be there.

Update your config.xml to include the platform; even if it is empty:

<platform name="android"/>
<platform name="ios"/>

Then, platform add will not update the platform in the config and look for resources that may not be there. You still should do ionic resources to generate them after the fact, though.

Error: Source path does not exist: resources/android/icon/drawable , command ionic cordova platform add android@6.3.0 --save and i got this error path does not exist: resources/android/icon/drawable-hdpi-icon.png showing wrong package name i am building on other project please  I'm getting an error whenever I build my application for iOS, after switching it to phonegap 7.0.1: Updating icons at - 9617739

In my case it was a config.xml path issue.

Before I had this:

<icon density="hdpi" src="res/android/ic-hdpi.png" />

but in my folder structure I have an extra folder called icon, so I change all the .png path files to:

<icon density="hdpi" src="res/icon/android/ic-hdpi.png" />

and it worked for me

Package build failure "Source path does not exist" – Ionic, Some users have reported an error on package builds that looks like this: Source path does not exist: resources\android\xxx\xxx.png This The current version of ionic resources function does not generate all versions, but some icons still exist in config.xml file from old commands. You can remove all <icon and <splash from config.xml (backup file first) then

For me, this issue was due to below line in config.xml:

'<preference name="orientation" value="portrait" />'

Actually when you try to add any platform using "ionic cordova platform add android/ios", it will add respective platform and generates respective resources("icon.png" and "splash.png"). With portrait orientation, it will add only relevant resources to that orientation(i.e. ionic cordova resources does not add the landscape images if the orientation is set to portrait) and fails with "UnhandledPromiseRejectionWarning: Error: Source path does not exist: resources/android/icon/drawable-hdpi-icon.png" error. Hence please check whether your config.xml have any preference for portrait/landscape mode.

Please remove any preference with portrait/landscape from your config.xml file before adding platform.

How can one fix the error Source path does not exist: icons/android , Source path does not exist: icons/android/ldpi.png? Plugin for GoogleMap fails during compile. Google Map not showing. Bernd_Sommer  If you project is created using Ionic then do the following :-Create the folder name "resources" in your projects root directory.; Place your icon file name as "icon.png" in the resouces folder.

may be while creating the ionic app resources not added properly simply you can do one thing install another app by using following command.

ionic start appname blank 

then copy the android icons folder and paste into you current app folder this will work fine.the image missed in your project is 72*72 image.please check the resources once.

ionic cordova build ios gives Error: Source path does not exist, source path does not exist cordova [cordova-res] error: missing source image for "icon" ionic resources resources/android/xml/network_security_config.xml ionic 3 Error: Source Path does not exist for android icon png when building for ionic Oct 20 '17 2 Can action buttons be added to dashboard table on activeadmin? May 22 '18

Common Cordova / Ionic build errors, ionic cordova build ios gives Error: Source path does not exist: Source path does not exist: resources\android\icon\drawable-xhdpi-icon.png. Pull on master. I added a custom icon for Android in config.xml but it referenced www/res.Since the www folder is .gitignored, that file was not found, breaking the build. . Moved the custom icon to src

UnhandledPromiseRejectionWarning: Error: Source path does not , If we find a directory containing the aforementioned paths, we will perform the Source path does not exist: resources/{platform}/icon/drawable-hdpi-icon.png. ERROR ENCOUNTERED !!! Collecting resource configuration and source images - failed! Error: Source image files were not found for the following platforms/types: [DEBUG] Error: Source image files were not found for the following platforms/types: at ResourcesCommand.<anonymous> (C:\Users\Phil\code\Documents\myApp ode_modules\@ionic\cli-plugin

UnhandledPromiseRejectionWarning: Error: Source path does not path does not exist: resources/android/icon/drawable-hdpi-icon.png at Building config. Ionic splash screen resources generator uploading splash.png Check and see if you specified a file in your config.xml that does not exist or is not where you thought it was, this was my issue This comment has been minimized. Sign in to view

Comments
  • With me, it was the other way around (developing on Windows), so I changed "/" to "\" and the problem was gone!
  • When you using only portrait mode than it only generates the resources for portrait not for landscape. But when we build the project it does require all resources. Removing orientation mode from config.xml does the trick . :)
  • I want to use a custom icon that gets built from the resources, though
  • ok add that custom image name in the place of drawable-hdpi-icon.png in the config.xml file or else change the name of the custom image name to drawable-hdpi-icon.png