Android app icon remains unchanged
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
Having the same issue
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
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
I don't like adaptive Icon. And in my case the icon is not displayed correctly. Anyone have a solution for the regular icon?
Any updates?
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
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
This is true, I ended up doing it through Android Studio.
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!
This seems like the same issue as #173 and #165, not sure yet. Will put it on the list to review for 1.0
Can't reproduce in @capacitor/assets