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.pngandicon-background.pngto theresources/androiddirectory - (Optional) Check if
cordova-resis the latest. For me I upgraded to version 0.15.3 on a mac with this commands:sudo npm -g remove cordova-resand 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


















