ionic cordova platform add android re-adds deprecated <splash> tags
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 56/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- cli
Research direction
Start with the ionic cordova platform add android flow in the Ionic CLI and trace its resource-generation integration, especially cordova-res 0.15.4; compare it with direct cordova platform add android. Done means adding Android no longer restores deprecated <splash> entries when the modern splash preferences are already present.
Written by the indexing model from the issue text.
Description
Description
When using Ionic CLI with a recent version of cordova-android, running:
ionic cordova platform add android
automatically re-adds deprecated <splash> entries to config.xml.
These tags are no longer supported by recent versions of cordova-android and cause the following warning/error during build:
The "<splash>" tags were detected and are no longer supported.
Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
The issue does not occur when adding the Android platform directly with Cordova CLI.
Environment
Ionic CLI : 7.2.1
Ionic Framework : @ionic/angular 9.0.1
@angular-devkit/build-angular : 22.1.6
@angular-devkit/schematics : 22.1.6
@angular/cli : 22.1.6
@ionic/angular-toolkit : 13.0.0
Cordova CLI : 13.0.0
Cordova Platforms : android 15.1.0
cordova-res : 0.15.4
NodeJS : v24.20.0
npm : 11.19.0
OS : Windows 10
Steps to reproduce
- Remove the Android platform:
ionic cordova platform rm android
- Remove all legacy
<splash>entries fromconfig.xml.
The relevant part of the configuration contains only the new splash screen preferences:
<preference
name="AndroidWindowSplashScreenBackground"
value="#000000" />
<preference
name="AndroidWindowSplashScreenAnimatedIcon"
value="resources/android/splashscreen.xml" />
- Run:
ionic cordova platform add android
- Check
config.xml.
The following entries are automatically added back:
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
Important comparison
If I repeat the same process but use Cordova CLI directly:
cordova platform rm android
cordova platform add android
the deprecated <splash> entries are NOT added back.
So the behavior appears to be specific to the Ionic CLI wrapper:
cordova platform add android
=> config.xml remains unchanged
ionic cordova platform add android
=> deprecated <splash> tags are added back
Expected behavior
ionic cordova platform add android should not add deprecated <splash> tags when using recent versions of cordova-android.
Ideally, it should preserve:
<preference
name="AndroidWindowSplashScreenAnimatedIcon"
value="resources/android/splashscreen.xml" />
without generating legacy splash screen entries.
Actual behavior
Ionic CLI re-adds legacy <splash> elements, even though they are unsupported by cordova-android 15.1.0.
Workaround
Using Cordova CLI directly avoids the problem:
cordova platform add android
After that, builds using:
ionic cordova build android
work correctly and do not re-add the <splash> entries.
Additional notes
This may be related to the Ionic CLI resource generation flow / cordova-res, since cordova-res 0.15.4 is used by the current Ionic CLI Cordova integration.
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 681
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ionic-team/ionic-cli
-
triage
Difficulty 1/5 Under an hour Newbie friendliness 65/100
ionic-team/ionic-cli#5016 ·
-
triage
Difficulty 5/5 Over a week Newbie friendliness 15/100
ionic-team/ionic-cli#5131 ·
-
triage
Difficulty 3/5 1-2 days Newbie friendliness 72/100
ionic-team/ionic-cli#5129 ·
-
triage
Difficulty 3/5 1-2 days Newbie friendliness 42/100
ionic-team/ionic-cli#5127 · 2 comments ·
-
triage
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
ionic-team/ionic-cli#5124 ·
All issues in ionic-team/ionic-cli
Similar issues
-
comp/desktop P3 type/bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
NousResearch/hermes-agent#118866 ·
-
Browser Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
getsentry/sentry-javascript#24577 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agilepathway/label-checker#640 ·
-
Plugin stuck at "loading" on DSH 0.1.6-alpha.2 — turnTail list slot registration missing options.id Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
chrisparsons83/flexspotff#153 ·