rpayanm
December 15, 2016, 5:36pm
1
Hello,
I start a blank project:
$ ionic start app blank --v2
I copied a resource folder from other project to this:
when I run:
$ ionic platform add android
or
$ cordova platform add android
Only this icon and splash screen are copied (in different resolutions) in platforms/android/res/:
Icon:
Splash screen:
Why my icon and splash screen aren’t copied?
Do you mean your icon and splash.psd files aren’t generating new launch icons and splash images inside the resources/android/icon and splash folders?
rpayanm
December 15, 2016, 6:03pm
3
No, the resources dont copied in platforms/android/res/
rpayanm
December 15, 2016, 6:23pm
5
yes, i understand that. I say when the platform is generated and run on a mobile:
$ ionic platform add android
$ ionic run android
Have you run a build process prior to running the ionic run android command?
I’ve always run a build process first, followed by the ionic run android command, whenever I’ve copied resources across and never had an issue with those files not copying.
Do you have a solution?
Thanks!
Place just one icon and splash image in resources folder and run ionic resources. It will automatically generate resources for ios and android.
for example, in my repo I’ve icons in icon folder https://github.com/aggarwalankush/ionic2-mosum/tree/master/icons and then I run a script to generate resouces https://github.com/aggarwalankush/ionic2-mosum/blob/master/post_install.sh
More details - http://ionicframework.com/docs/cli/icon-splashscreen.html
Nexi
December 18, 2016, 10:58pm
9
try using this:
ionic platform rm android
ionic platform add android@latest
ionic resources