Ionic framework 离子闪屏不';行不通

Ionic framework 离子闪屏不';行不通,ionic-framework,screen,splash-screen,Ionic Framework,Screen,Splash Screen,我正在尝试在Ionic中显示我的应用程序的启动屏幕。我读了很多文章和教程,但仍然一无所获。。。它是通过浏览器工作还是仅在设备上工作?我尝试了两种方法,但仍然没有启动屏幕。帮帮我,伙计们,我不知道我做错了什么。这是我的密码: [config.xml] <preference name="SplashScreen" value="screen"/> <preference name="SplashScreenDelay" value="3000"/> <preferen

我正在尝试在Ionic中显示我的应用程序的启动屏幕。我读了很多文章和教程,但仍然一无所获。。。它是通过浏览器工作还是仅在设备上工作?我尝试了两种方法,但仍然没有启动屏幕。帮帮我,伙计们,我不知道我做错了什么。这是我的密码:

[config.xml]

<preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="3000"/>
<preference name="AutoHideSplashScreen" value="true"/>
<preference name="FadeSplashScreen" value="true"/>
<preference name="FadeSplashScreenDuration" value="2000"/>
<platform name="android">
<icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/>
<icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi"/>
<icon src="resources/android/icon/drawable-hdpi-icon.png" density="hdpi"/>
<icon src="resources/android/icon/drawable-xhdpi-icon.png" density="xhdpi"/>
<icon src="resources/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/>
<icon src="resources/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/>
<splash src="resources/android/splash/drawable-land-ldpi-screen.png" density="land-ldpi"/>
<splash src="resources/android/splash/drawable-land-mdpi-screen.png" density="land-mdpi"/>
<splash src="resources/android/splash/drawable-land-hdpi-screen.png" density="land-hdpi"/>
<splash src="resources/android/splash/drawable-land-xhdpi-screen.png" density="land-xhdpi"/>
<splash src="resources/android/splash/drawable-land-xxhdpi-screen.png" density="land-xxhdpi"/>
<splash src="resources/android/splash/drawable-land-xxxhdpi-screen.png" density="land-xxxhdpi"/>
<splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/>
<splash src="resources/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/>
<splash src="resources/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/>
<splash src="resources/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/>
<splash src="resources/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/>
<splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/>
</platform>
<platform name="ios">
<icon src="resources/ios/icon/icon.png" width="57" height="57"/>
<icon src="resources/ios/icon/icon@2x.png" width="114" height="114"/>
<icon src="resources/ios/icon/icon-40.png" width="40" height="40"/>
<icon src="resources/ios/icon/icon-40@2x.png" width="80" height="80"/>
<icon src="resources/ios/icon/icon-40@3x.png" width="120" height="120"/>
<icon src="resources/ios/icon/icon-50.png" width="50" height="50"/>
<icon src="resources/ios/icon/icon-50@2x.png" width="100" height="100"/>
<icon src="resources/ios/icon/icon-60.png" width="60" height="60"/>
<icon src="resources/ios/icon/icon-60@2x.png" width="120" height="120"/>
<icon src="resources/ios/icon/icon-60@3x.png" width="180" height="180"/>
<icon src="resources/ios/icon/icon-72.png" width="72" height="72"/>
<icon src="resources/ios/icon/icon-72@2x.png" width="144" height="144"/>
<icon src="resources/ios/icon/icon-76.png" width="76" height="76"/>
<icon src="resources/ios/icon/icon-76@2x.png" width="152" height="152"/>
<icon src="resources/ios/icon/icon-83.5@2x.png" width="167" height="167"/>
<icon src="resources/ios/icon/icon-small.png" width="29" height="29"/>
<icon src="resources/ios/icon/icon-small@2x.png" width="58" height="58"/>
<icon src="resources/ios/icon/icon-small@3x.png" width="87" height="87"/>
<splash src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" height="1136"/>
<splash src="resources/ios/splash/Default-667h.png" width="750" height="1334"/>
<splash src="resources/ios/splash/Default-736h.png" width="1242" height="2208"/>
<splash src="resources/ios/splash/Default-Landscape-736h.png" width="2208" height="1242"/>
<splash src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" height="1536"/>
<splash src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" height="2048"/>
<splash src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" height="768"/>
<splash src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" height="2048"/>
<splash src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" height="2732"/>
<splash src="resources/ios/splash/Default-Portrait~ipad.png" width="768" height="1024"/>
<splash src="resources/ios/splash/Default@2x~iphone.png" width="640" height="960"/>
<splash src="resources/ios/splash/Default~iphone.png" width="320" height="480"/>
</platform>
<icon src="resources/android/icon/drawable-xhdpi-icon.png"/>

splashscreen只能在设备上工作

检查是否已安装此cordova插件:
cordova插件splashscreen
。 您可以使用
cordova插件列表
命令检查它

你没有别的事可做了


如果它仍然不起作用,我建议使用
离子资源--splash
命令再次添加您的splashscreen。请参阅。

飞溅屏幕只能在设备上工作

检查是否已安装此cordova插件:
cordova插件splashscreen
。 您可以使用
cordova插件列表
命令检查它

你没有别的事可做了


如果它仍然不起作用,我建议使用
离子资源--splash
命令再次添加您的splashscreen。参见。

这里也回答了这个问题:
这个问题也在这里得到了回答:

这很奇怪。你试过一个干净的项目吗?你们有一个空白的屏幕,而不是飞溅屏幕或其他东西吗?我并没有尝试清洁项目。今天我将对此进行测试。我没有启动屏幕,甚至连一个空白的也没有。真奇怪。你试过一个干净的项目吗?你们有一个空白的屏幕,而不是飞溅屏幕或其他东西吗?我并没有尝试清洁项目。今天我将对此进行测试。我没有启动屏幕,甚至是空白的。请不要添加多个问题。回答最好的一个,并将其余的标记为重复项。请参见“请不要添加多个问题”。回答最好的一个,并将其余的标记为重复项。看见
.run(function($ionicPlatform) {
 $ionicPlatform.ready(function() {
if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
  cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
  cordova.plugins.Keyboard.disableScroll(true);
}
if (window.StatusBar) {
  StatusBar.styleDefault();
}
navigator.splashscreen.show();
});
})