capacitor-assets icon indicating copy to clipboard operation
capacitor-assets copied to clipboard

Android app icon remains unchanged

Open tobiasmuecksch opened this issue 4 years ago • 10 comments

As already mentioned in the comments here when generating icons for android, some icon files remain unchanged.

For me that is all the ic_launcher_foreground.png files (hdpi, mdpi, etc.)

Therefore, the default capacitor icon remains and the app icon on my android devices now is the capacitor icon.

Ionic info:

Ionic:

   Ionic CLI                     : 6.11.10 (/Users/tmuecksch/.npm-global/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.3.4
   @angular-devkit/build-angular : 0.803.29
   @angular-devkit/schematics    : 8.3.29
   @angular/cli                  : 8.3.29
   @ionic/angular-toolkit        : 2.3.3

Capacitor:

   Capacitor CLI   : 2.4.2
   @capacitor/core : 2.4.2

Utility:

   cordova-res                          : 0.15.1
   native-run (update available: 1.2.1) : 0.3.0

System:

   NodeJS : v14.13.0 (/usr/local/bin/node)
   npm    : 6.14.8
   OS     : macOS Catalina

tobiasmuecksch avatar Oct 05 '20 06:10 tobiasmuecksch

Having the same issue

generalzodo avatar Oct 12 '20 15:10 generalzodo

Same problem. App icon unchanged.

cordova-res android --skip-config --copy

WARN: Error occurred while copying resources/android/icon/mdpi-foreground.png WARN: Error occurred while copying resources/android/icon/hdpi-foreground.png WARN: Error occurred while copying resources/android/icon/xhdpi-foreground.png WARN: Error occurred while copying resources/android/icon/xxhdpi-foreground.png WARN: Error occurred while copying resources/android/icon/xxxhdpi-foreground.png

Ionic:

Ionic CLI : 6.11.11 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 5.3.5 @angular-devkit/build-angular : 0.1000.8 @angular-devkit/schematics : 10.0.8 @angular/cli : 10.0.8 @ionic/angular-toolkit : 2.3.3

Capacitor:

Capacitor CLI : 2.4.2 @capacitor/core : 2.4.2

Utility:

cordova-res : 0.15.1 native-run (update available: 1.2.1) : 0.3.0

System:

NodeJS : v12.18.3 (/usr/local/bin/node) npm : 6.14.6 OS : Linux 5.4

vitiumartis avatar Oct 13 '20 09:10 vitiumartis

got a solution..

Adaptive Icons Android Adaptive Icons are also supported. If you choose to use them, create the following additional file(s):

resources/android/icon-foreground.png must be at least 432×432px resources/android/icon-background.png must be at least 432×432px

just create the above files in their location and run again

generalzodo avatar Oct 14 '20 05:10 generalzodo

I don't like adaptive Icon. And in my case the icon is not displayed correctly. Anyone have a solution for the regular icon?

vitiumartis avatar Oct 29 '20 13:10 vitiumartis

Any updates?

lukasrybacki avatar Feb 25 '21 14:02 lukasrybacki

I have the same issue. I added my files in the resources directory and executed cordova-res android rebuild via ionic build and compiled the app via android studio. Nothing changed. I even tried it with adaptive icons and this wont work too

nsauter avatar May 05 '21 19:05 nsauter

For me rebuilding the android folder worked:

rm -rf android
npx cap add android
# Repeat all changes you did to the Android folder & add Ionic Deploy again if you use it
npx cordova-res android --skip-config --copy
npx cap sync

Zwimber avatar Aug 02 '21 15:08 Zwimber

This is true, I ended up doing it through Android Studio.

1x2x3x4x avatar Sep 08 '21 08:09 1x2x3x4x

I fix this issue after copying my icon.png twice, move to resource/android, rename to icon-background.png and icon-background.png. After this I run cordova-res android --skip-config --copy and works!

LucasJordi avatar Oct 24 '21 19:10 LucasJordi

This seems like the same issue as #173 and #165, not sure yet. Will put it on the list to review for 1.0

mlynch avatar Nov 01 '21 20:11 mlynch

Can't reproduce in @capacitor/assets

mlynch avatar Oct 02 '22 21:10 mlynch