jordancooperman
jordancooperman

Reputation: 2011

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!

Upvotes: 3

Views: 1857

Answers (3)

Sindarus
Sindarus

Reputation: 569

I had the same issue, solved it by running cordova plugin add cordova-plugin-splashscreen in the project's root folder. It will install the splashscreen plugin for cordova. I thought Ionic was shipped with it already, so installing it again seems weird but it worked ...

Upvotes: 0

jordancooperman
jordancooperman

Reputation: 2011

Thanks @刘文壮 for your response. Although I do not know the true cause of the problem, reverting to version [email protected] did fix the problem.

Upvotes: 0

V&#237;ctor
V&#237;ctor

Reputation: 3039

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

  <preference name="SplashScreen" value="screen"/>
  <preference name="SplashScreenDelay" value="3000"/>

Upvotes: 1

Related Questions