Reputation: 2011
I've been unable to get splash screens working on new Ionic projects. Here are the steps that I've taken:
ionic start testApp
cd testApp
ionic platform add android
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:
<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
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
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
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