WARN: Error occurred while copying resources/android/icon/xxxhdpi-foreground.png WARN: Error occurred while copying resources/android/icon/xxhdpi-background.png WARN: Error occurred while copying resources/android/icon/xxhdpi-foreground.png WARN: Error occurred while copying resources/android/icon/xhdpi-background.png WARN: Error occurred while copying resources/android/icon/xhdpi-foreground.png WARN: Error occurred while copying resources/android/icon/hdpi-background.png WARN: Error occurred while copying resources/android/icon/hdpi-foreground.png WARN: Error occurred while copying resources/android/icon/mdpi-background.png
WARN: Error occurred while copying resources/android/icon/mdpi-foreground.png If you don't provide them, in newer versions of Android like Android Pie, the icon will be empty and you will get an error in your terminal when generating them with cordova-res: Generated 18 resources for Android The icon-background and icon-foreground image are necessary for the Icon Adaptive Design. In my case, the required images are the following ones with the mentioned dimensions: These need to be located in the root directory of your CapacitorJS project under the resources directory like this: resources/ So the icon will be smaller in the image as it should have the mentioned padding. The system reserves the outer 18 dp on each of the 4 sides to create interesting visual effects, such as parallax or pulsing. Remember that for icon-background and icon-foreground, only the inner 72 x 72 dp of the icon appears within the masked viewport. It must be sized at 108 x 108 dp (xxxhdpi: 432 x 432 pixels.).
For native applications, icons can be easily generated using the Image Asset Studio tool that helps you generate your own app icons from material icons, custom images, and text strings. One of the best ways to make your app stand out from other apps is without a doubt an eye-catching icon.