I ran into the same error in a new Ionic Capacitor@2.4.7 project. I had the splash.png
and icon.png
in the resources
directory. But those aren’t enough. The error is related to the Adaptive Icons section for cordova-res
. 2 more icons are missing in your resources
directory.
- Add the required
icon-foreground.png
andicon-background.png
to theresources/android
directory - (Optional) Check if
cordova-res
is the latest. For me I upgraded to version 0.15.3 on a mac with this commands:sudo npm -g remove cordova-res
and thensudo npm -g install cordova-res --unsafe-perm
- Re-run the command:
cordova-res android --skip-config --copy
- Successful output now looks like (the 18 changed to 24):
Generated 24 resources for Android
Copied 31 resource items to Android