cordova-icon icon indicating copy to clipboard operation
cordova-icon copied to clipboard

Android Icons not working

Open ccorcos opened this issue 7 years ago • 5 comments

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?

ccorcos avatar Feb 21 '18 06:02 ccorcos

This fixed my problem

 cp -rf platforms/android/app/src/main/res/* platforms/android/res

ccorcos avatar Feb 21 '18 06:02 ccorcos

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 avatar Mar 05 '18 05:03 yoyo-real

@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.

JoxC avatar Mar 28 '18 11:03 JoxC

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

alexkander avatar Nov 19 '18 21:11 alexkander

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"

jj449 avatar Dec 27 '19 01:12 jj449