Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic splash screen will not show in Android on brand new project

I've been unable to get splash screens working on new Ionic projects. Here are the steps that I've taken:

  1. ionic start testApp
  2. cd testApp
  3. ionic platform add android
  4. ionic run android

The app works just fine, but the splash screen WILL NOT show up. Everything appears to run fine aside from a handful of warnings in the build, I'm not sure if they're related:

:CordovaLib:compileDebugJavaWithJavacNote: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details.

:compileDebugJavaWithJavacNote: /Users/jordancooperman/code/testApp/platforms/android/src/org/apache/cordova/splashscreen/SplashScreen.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.

I've tried many permutations inside of config.xml, including:

  1. Changing the source file/directory names to match the destination file/directory names.
  2. Using both 'screen' and 'splash' for values in the SplashScreen preference, i.e. <preference name="SplashScreen" value="screen"/>

I've gotten this working in the past when using only Cordova, but using Ionic now it seems to breaking. I'm wondering if it's something with my plugin versions not playing nicely together? See versions here:

cordova-plugin-console 1.0.2 "Console" cordova-plugin-device 1.1.1 "Device" cordova-plugin-splashscreen 3.1.0 "Splashscreen" cordova-plugin-statusbar 2.1.2 "StatusBar" cordova-plugin-whitelist 1.2.1 "Whitelist" ionic-plugin-keyboard 1.0.8 "Keyboard"

It all seems pretty cut an dry. I've looked at a ton of SO and Ionic posts about the problem, and none of the proposed solutions have worked. I'm out of ideas, banging my head against a wall after hours of tinkering. Any help is greatly appreciated!

like image 240
jordancooperman Avatar asked Dec 05 '25 09:12

jordancooperman


1 Answers

It happened to me yesterday, I solved changing my config.xml to this:

  <preference name="SplashScreen" value="screen"/>
  <preference name="SplashScreenDelay" value="3000"/>
like image 87
Víctor Avatar answered Dec 06 '25 22:12

Víctor