I'm using ionic to generate resources (icon and splash). I'm using ionic v2.1.0 and cordova v6.4.0.
Until now I've been using (it was working in previous versions):
cordova platform add android
ionic resources
This was adding android with this version:
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: ...
Name: ...
Activity: MainActivity
Android target: android-24
Subproject Path: CordovaLib
Android project created with [email protected]
In previous cli versions, ionic resources was generating corresponding entries in config.xml and the resources were placed correctly.
But after upgrading cordova and/or ionic cli, the resources for android have not being copied, so icon and splash remain as cordova ones. I've seen this thread and it says to remove android platform and then use this command:
cordova platform add android@latest
So this adds this platform:
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: ...
Name: ...
Activity: MainActivity
Android target: android-25
Subproject Path: CordovaLib
Android project created with [email protected]
And successfully copies the icons and splash. The problem is that this creates an extra res folder:
├── bower.json
├── config.xml
├── gulpfile.js
├── hooks
├── ionic.config.json
├── node_modules
├── package.json
├── platforms
├── plugins
├── res
│ ├── drawable-land-hdpi
│ ├── drawable-land-ldpi
│ ├── drawable-land-mdpi
│ ├── drawable-land-xhdpi
│ ├── drawable-land-xxhdpi
│ ├── drawable-land-xxxhdpi
│ ├── drawable-port-hdpi
│ ├── drawable-port-ldpi
│ ├── drawable-port-mdpi
│ ├── drawable-port-xhdpi
│ ├── drawable-port-xxhdpi
│ ├── drawable-port-xxxhdpi
│ ├── mipmap-hdpi
│ ├── mipmap-ldpi
│ ├── mipmap-mdpi
│ ├── mipmap-xhdpi
│ ├── mipmap-xxhdpi
│ └── mipmap-xxxhdpi
├── resources
├── scss
└── www
So my question are:
- What is the purpose of this extra generated
resfolder? - Can I safely remove
resfolder? - How can I manage now if I want a different icon for android and for ios? (in older cases I was copying generated resources for android in backup folder, generating new resources for ios and then mixing them and making
cordova prepare)