#1 2016-11-20 23:03:18

edunt
Member
Registered: 2015-12-21
Posts: 258

Custom app icons and splash screens not working in cordova-android v6

Hi David,

There is an issue with the icon I added to the Icon file path.

The is no problem with the icon.png itself but after compile, the icon displayed on my phone is different from what I used.

IconIssue.png

This is what the icon is on my phone.

cordova_bot.png

What could caused the issue?

Last edited by edunt (2016-11-20 23:15:06)

Offline

#2 2016-11-20 23:27:44

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: Custom app icons and splash screens not working in cordova-android v6

Hello edunt,

Apparently there is a bug in the latest version that causes the problem. The solution probably is to downgrade Apache Cordova into a previous version. Look also here for possible workarounds and and other solutions edunt.

Offline

#3 2016-11-21 07:10:25

tin
Member
Registered: 2016-03-20
Posts: 161

Re: Custom app icons and splash screens not working in cordova-android v6

My trick is after build project with cordova first time.I copy "res" folder in compile folder to "platforms\android\res" folder.
Then build with cordova again.It fix this bug.

Offline

#4 2016-11-21 09:27:14

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: Custom app icons and splash screens not working in cordova-android v6

Hello to tall,

tin wrote:

My trick is after build project with cordova first time.I copy "res" folder in compile folder to "platforms\android\res" folder.
Then build with cordova again.It fix this bug.

Then maybe it's possible to use the "xcopy" command in the Extra BAT file option in the Cordova tabs of the app's options dialog in order to copy or move the icons... but anyway this bug was fixed in the next Apache Cordova release, or maybe we can downgrade to a 5.x version in order to avoid the problem.

Offline

#5 2016-11-24 00:44:50

edunt
Member
Registered: 2015-12-21
Posts: 258

Re: Custom app icons and splash screens not working in cordova-android v6

Hi Tin & David,

Thanks for the info. I will use xcopy.

Offline

#6 2016-12-12 18:13:11

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: Custom app icons and splash screens not working in cordova-android v6

Hello to all,

Another possible solution is to "downgrade" Apache Cordova. We can open a console (as admin) and type this:

npm uninstall -g cordova

Once the uninstallation end we can then type this:

npm install -g cordova@6.3.1

The 6.3.1 version of Apache Cordova doesn't have the introduced bug with the app's icons.

Offline

#7 2016-12-31 09:20:11

edunt
Member
Registered: 2015-12-21
Posts: 258

Re: Custom app icons and splash screens not working in cordova-android v6

Notes:
This issue is solved in `cordova-android 6.1.0` but if you try `cordova platform update android` at this moment doesn't update to `6.1.0`.

Run...

cordova platform update android@6.1.0 --save
cordova platform rm android
cordova platform add android

... to solve this issue.

Offline

#8 2016-12-31 12:52:18

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: Custom app icons and splash screens not working in cordova-android v6

Hello to all,

edunt wrote:

Notes:
This issue is solved in `cordova-android 6.1.0` but if you try `cordova platform update android` at this moment doesn't update to `6.1.0`.
Run
```bash
cordova platform update android@6.1.0 --save
cordova platform rm android
cordova platform add android
```
to solve this issue.

If you suggest to install Cordova 6.1.0 version, but, the icons bug is not in the 6.3.1 version... it's not better to install the 6.3.1 version? I just asking edunt... smile

Offline

#9 2016-12-31 21:38:07

edunt
Member
Registered: 2015-12-21
Posts: 258

Re: Custom app icons and splash screens not working in cordova-android v6

David wrote:

Hello to all,
If you suggest to install Cordova 6.1.0 version, but, the icons bug is not in the 6.3.1 version... it's not better to install the 6.3.1 version? I just asking edunt... smile

Hi David,

You are right. I just added the command syntax for others, moreover, at the time of writing the command the version was 6.1.

Cheers.

Offline

#10 2016-12-31 21:39:05

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: Custom app icons and splash screens not working in cordova-android v6

Hello to all,

No problem! It's good to know how we can install some specific version of Apache Cordova edunt. smile

Offline

#11 2017-01-24 18:33:44

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: Custom app icons and splash screens not working in cordova-android v6

Hello to all,

Just to say that the currently available Apache Cordova 6.5.0 version finally solve the problem with the app's icon. Anyone who want to upgrade, just open a console (press WIN + R and then type "cmd" and then ENTER) and write something like this:

npm update -g cordova

Offline

#12 2017-01-24 20:32:05

edunt
Member
Registered: 2015-12-21
Posts: 258

Re: Custom app icons and splash screens not working in cordova-android v6

Good to know. Thanks David.

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.