You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/08/25 17:24:46 UTC

[GitHub] [cordova-android] jondspa opened a new issue #1055: Trouble changing desktop icon for Cordova Android

jondspa opened a new issue #1055:
URL: https://github.com/apache/cordova-android/issues/1055


   I'm using adaptive icons for my Cordova Android app. I'm trying to change the icon but no matter what I do, I still get the old icon!
   
   Cordova version 9.0.0, android platform version 8.1.0
   
   I've changed the icons in my config.xml. They are copied into the android/app/src/main/res directory correctly. But I still get the old icon. I've deleted the app on my phone, no difference. I see lots of SO questions about how to use icons for Cordova but none how to change. I see some mention of deleting my cordova android platform but that seems too harsh and I assume would break other things - and I surely don't need to do that every time I change the icon!
   
   Thanks for any help.
   
   Jon
   Here's my config.xml section:
   
    <platform name="android">
       <icon background="res/icons4/background-ldpi.png" density="ldpi" foreground="res/icons4/foreground-ldpi.png" />
       <icon background="res/icons4/background-mdpi.png" density="mdpi" foreground="res/icons4/foreground-mdpi.png" />
       <icon background="res/icons4/background-hdpi.png" density="hdpi" foreground="res/icons4/foreground-hdpi.png" />
       <icon background="res/icons4/background-xhdpi.png" density="xhdpi" foreground="res/icons4/foreground-xhdpi.png" />
       <icon background="res/icons4/background-xxhdpi.png" density="xxhdpi" foreground="res/icons4/foreground-xxhdpi.png" />
       <icon background="res/icons4/background-xxxhdpi.png" density="xxxhdpi" foreground="res/icons4/foreground-xxxhdpi.png" />
    </platform>
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek edited a comment on issue #1055: Trouble changing desktop icon for Cordova Android

Posted by GitBox <gi...@apache.org>.
breautek edited a comment on issue #1055:
URL: https://github.com/apache/cordova-android/issues/1055#issuecomment-680213076


   My bad... it should be `cordova prepare --verbose`
   
   > Do i really need to remove the platform every time I change the icon? I've never had to remove the platform before.
   
   You shouldn't but it could be a temporary workaround for you.
   
   If you really don't want to remove the platform, `cordova clean android` may do the job as well, it will clean up build artefacts.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] jondspa commented on issue #1055: Trouble changing desktop icon for Cordova Android

Posted by GitBox <gi...@apache.org>.
jondspa commented on issue #1055:
URL: https://github.com/apache/cordova-android/issues/1055#issuecomment-680989946


   I tried to remove and re-add the android platform last night without success.  Had a little trouble removing the platform but then couldn't re-add the platform due to one of my plugins (firebase) failing to install.  (Good thing I backed it up.)  I'm going to try to use the old style icons (ldpi.png, mdpi.png. etc.) unless you have any other ideas.
   
   Didn't realize I had to go cordova-android@9 as part of API 29.  If so I'll have to figure out the problem with firebase (and any other plugins that don't install right away).
   
   It's still weird to me that changing adaptive icons is this hard.  I can change the old style icons easily!
   
   Thanks again!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek commented on issue #1055: Trouble changing desktop icon for Cordova Android

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #1055:
URL: https://github.com/apache/cordova-android/issues/1055#issuecomment-680228672


   > I'm embarrassed to ask this but does removing the platform and re-adding it lose any of my work? I have not changed anything in the platform directory as far as I remember.
   
   It shouldn't, unless if you ever made manual modifications to a file inside `platforms/` directory. It isn't recommended to make manual modifications because it makes it difficult to share the project in team environments, and there are lot of generated files that may become overwritten when using cordova commands... but when in doubt, make a backup. Copy the `platforms` directory, or the entire project folder to a backup location, so you can easily restore it.
   
   You also have no choice to remove and add the platform when doing platform upgrades, which would be recommended by the way. The latest version is `cordova-android@9` which targets API 29, something that Google will start enforcing later this year.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek edited a comment on issue #1055: Trouble changing desktop icon for Cordova Android

Posted by GitBox <gi...@apache.org>.
breautek edited a comment on issue #1055:
URL: https://github.com/apache/cordova-android/issues/1055#issuecomment-680213076


   My bad... it should be `cordova prepare --verbose`
   
   > Do i really need to remove the platform every time I change the icon? I've never had to remove the platform before.
   
   You shouldn't but it could be a temporary workaround for you.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] jondspa commented on issue #1055: Trouble changing desktop icon for Cordova Android

Posted by GitBox <gi...@apache.org>.
jondspa commented on issue #1055:
URL: https://github.com/apache/cordova-android/issues/1055#issuecomment-680212412


   Thanks for the response!  Unfortunately cordova prepare -v didn't do anything.  I'm pretty sure the icons have already been copied over from doing build's.  Do i really need to remove the platform every time I change the icon?  I've never had to remove the platform before.
   I haven't make any changes to the platform, just never removed and added it before.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] viaativaweb commented on issue #1055: Trouble changing desktop icon for Cordova Android

Posted by GitBox <gi...@apache.org>.
viaativaweb commented on issue #1055:
URL: https://github.com/apache/cordova-android/issues/1055#issuecomment-867242042


   I'm having the same issue, not event removing the platform seems to work!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek commented on issue #1055: Trouble changing desktop icon for Cordova Android

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #1055:
URL: https://github.com/apache/cordova-android/issues/1055#issuecomment-680167704


   > I see some mention of deleting my cordova android platform but that seems too harsh and I assume would break other things
   
   This would only "break" things if you make manual modifications to things inside the `platforms/` folder, which isn't recommended.
   
   If you run `cordova prepare -v`, you should see
   
   ```
   Updating icons at platforms/android/app/src/main/res
     copy  res/android/icon/ldpi.png platforms/android/app/src/main/res/mipmap-mdpi/ic_launcher.png (updated file)
   ```
   
   Tested on cordova 10 / android platform 8.0.
   
   There are checks to determine if the icon has changed, but I'm unfamiliar how it do those checks.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek edited a comment on issue #1055: Trouble changing desktop icon for Cordova Android

Posted by GitBox <gi...@apache.org>.
breautek edited a comment on issue #1055:
URL: https://github.com/apache/cordova-android/issues/1055#issuecomment-680167704


   > I see some mention of deleting my cordova android platform but that seems too harsh and I assume would break other things
   
   This would only "break" things if you make manual modifications to things inside the `platforms/` folder, which isn't recommended.
   
   If you run `cordova prepare --verbose`, you should see
   
   ```
   Updating icons at platforms/android/app/src/main/res
     copy  res/android/icon/ldpi.png platforms/android/app/src/main/res/mipmap-mdpi/ic_launcher.png (updated file)
   ```
   
   Tested on cordova 10 / android platform 8.0.
   
   There are checks to determine if the icon has changed, but I'm unfamiliar how it do those checks.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek edited a comment on issue #1055: Trouble changing desktop icon for Cordova Android

Posted by GitBox <gi...@apache.org>.
breautek edited a comment on issue #1055:
URL: https://github.com/apache/cordova-android/issues/1055#issuecomment-680213076


   My bad... it should be `cordova prepare --verbose`
   
   > Do i really need to remove the platform every time I change the icon? I've never had to remove the platform before.
   
   You shouldn't but it could be a temporary workaround for you.
   
   If you really don't want to remove the platform, `cordova clean android` may do the job as well, it will clean up build artefacts. Perhaps gradle or something is caching something.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek commented on issue #1055: Trouble changing desktop icon for Cordova Android

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #1055:
URL: https://github.com/apache/cordova-android/issues/1055#issuecomment-867245231


   I haven't used adaptive icons yet, but this is what I use in my apps:
   
   ```xml
   <platform name="android">
       ...
       <icon density="ldpi" src="res/android/icon/ldpi.png" />
       <icon density="mdpi" src="res/android/icon/mdpi.png" />
       <icon density="hdpi" src="res/android/icon/hdpi.png" />
       <icon density="xhdpi" src="res/android/icon/xhdpi.png" />
       <icon density="xxhdpi" src="res/android/icon/xxhdpi.png" />
       <icon density="xxxhdpi" src="res/android/icon/xxxhdpi.png" />
   </platform>
   ```
   
   With the icons having the following resolutions:
   
   |density|resolution|
   |------|------|
   |ldpi|36x36|
   |mdpi|48x48|
   |hdpi|72x72|
   |xhdpi|96x96|
   |xxhdpi|144x144|
   |xxxhdpi|192x192|
   
   These **should** work. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] jondspa commented on issue #1055: Trouble changing desktop icon for Cordova Android

Posted by GitBox <gi...@apache.org>.
jondspa commented on issue #1055:
URL: https://github.com/apache/cordova-android/issues/1055#issuecomment-680226822


   Still no success.  I did the prepare statement and it did say it was copying over icons.  I had done clean before but tried it again.  Still get the old icon.
   
   I'm embarrassed to ask this but does removing the platform and re-adding it lose any of my work?  I have not changed anything in the platform directory as far as I remember.
   
   Many thanks for your continued help!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek commented on issue #1055: Trouble changing desktop icon for Cordova Android

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #1055:
URL: https://github.com/apache/cordova-android/issues/1055#issuecomment-680213076


   My bad... it should be `cordova prepare --verbose`


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org