AlexDisler / cordova-icon

Automatic icon resizing for Cordova
MIT License
689 stars 292 forks source link

Android Icons not working #118

Open ccorcos opened 6 years ago

ccorcos commented 6 years ago

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 commented 6 years ago

This fixed my problem

 cp -rf platforms/android/app/src/main/res/* platforms/android/res
yoyo-real commented 6 years ago

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 cordova-icon@0.13.0 -g
JoxC commented 6 years ago

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

alexkander commented 5 years ago

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

jj449 commented 4 years ago

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"