etoscnyl etoscnyl - 2 months ago 12
Android Question

Cordova Splash Screen not displaying image

I'm developing an app using Cordova, and I'm unable to get the plugin "cordova-plugin-splashscreen" to work on Android (and I've only tested on Android).

I've installed the plugin using the cordova cli tool:

$ cordova plugin add cordova-plugin-splashscreen

And these are my config.xml-entries related to the plugin:

<platform name="android">
<splash src="res/screen/android/splash.png" density="port-hdpi" />
<splash src="res/screen/android/splash.png" density="port-ldpi" />
<splash src="res/screen/android/splash.png" density="port-mdpi" />
<splash src="res/screen/android/splash.png" density="port-xhdpi" />
<splash src="res/screen/android/splash.png" density="port-xxhdpi" />
<splash src="res/screen/android/splash.png" density="port-xxxhdpi" />

<splash src="res/screen/android/splash.png" density="land-hdpi" />
<splash src="res/screen/android/splash.png" density="land-ldpi" />
<splash src="res/screen/android/splash.png" density="land-mdpi" />
<splash src="res/screen/android/splash.png" density="land-xhdpi" />
<splash src="res/screen/android/splash.png" density="land-xxhdpi" />
<splash src="res/screen/android/splash.png" density="land-xxxhdpi" />
<preference name="AutoHideSplashScreen" value="true" />
<preference name="SplashScreenDelay" value="10000" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="ShowSplashScreenSpinner" value="false" />

Instead of displaying the intented "res/screen/android/splash.png", the splash screen instead shows the default cordova icon or simply a gray empty screen.


Currently recommended solution:

Update cordova-android to version 6.1.0, where this bug is no longer present

Workaround, for the record:

"Solved" with workaround by manually replacing assets in:


Problem appears to be caused by the following bug: