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 Ionic this works for me:
npm i -g cordova-res
ionic cordova resources --cordova-res
found here https://github.com/ionic-team/ionic-cli/issues/3762#issuecomment-456967033
Think it's an mac/windows-issue.
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" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With