cordova-icon
cordova-icon copied to clipboard
Android Icons not working
I'm having an issue getting the icons to work with android. It works fine with iOS. It appears to succeed:
Checking Project & Icon
✓ platforms found: android
✓ icon.png exists
✓ config.xml exists
Generating Icons for android
✓ mipmap-xxhdpi/icon.png created
✓ drawable/icon.png created
✓ mipmap-xhdpi/icon.png created
✓ mipmap-hdpi/icon.png created
✓ mipmap-mdpi/icon.png created
✓ drawable-xhdpi/icon.png created
✓ drawable-hdpi/icon.png created
✓ drawable-xxxhdpi/icon.png created
✓ drawable-xxhdpi/icon.png created
✓ mipmap-xxxhdpi/icon.png created
✓ mipmap-ldpi/icon.png created
✓ drawable-mdpi/icon.png created
✓ drawable-ldpi/icon.png created
But when I look at those images, some of them are the default Cordova icon and some are the splashscreen even. Any ideas?
This fixed my problem
cp -rf platforms/android/app/src/main/res/* platforms/android/res
Are you using old cordova-android?
Readme has the following explanation:
If you are using an older version of cordova (before 7.x):
$ sudo npm install [email protected] -g
@yoyo-real Old version really fixes the problem. But my cordova is 8.0 with an old 6.3 version android. Maybe readme could be clearer. Thanks anyway.
Hi @ccorcos, I made a pullrequest to solve this. [https://github.com/AlexDisler/cordova-icon/pull/130](pull request 130). To fix your issue you have to execute
$ cordova-icon --iconspath=platforms/android/res/
I hope it help you, regards
This fixed my problem
cp -rf platforms/android/app/src/main/res/* platforms/android/res
this will cause build android error : "initialed cordova .... classs not found"