Ionic App 在启动画面后显示白屏
Posted
技术标签:
【中文标题】Ionic App 在启动画面后显示白屏【英文标题】:Ionic App showing white Screen after Splash screen 【发布时间】:2019-03-15 17:29:05 【问题描述】:我的应用程序在启动画面后显示白屏 3 到 4 秒。我已经在下面给出的 ionic 4 项目中配置了这些属性,但它无法解决我的问题。
<preference name="AutoHideSplashScreen" value="false" />
<preference name="SplashScreenDelay" value="8000" />
<preference name="FadeSplashScreenDuration" value="1000" />
<preference name="SplashScreen" value="screen" />
<preference name="ShowSplashScreen" value="true" />
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="FadeSplashScreen" value="true" />
我在下面给出了我的 package.json 文件。请仔细看,帮我解决一下
"name": "Test",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts":
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
,
"private": true,
"dependencies":
"@angular/common": "^7.2.2",
"@angular/core": "^7.2.2",
"@angular/forms": "^7.2.2",
"@angular/http": "^7.2.6",
"@angular/platform-browser": "^7.2.2",
"@angular/platform-browser-dynamic": "^7.2.2",
"@angular/router": "^7.2.2",
"@ionic-native/core": "^5.0.0",
"@ionic-native/http": "^5.2.0",
"@ionic-native/local-notifications": "^5.2.0",
"@ionic-native/screen-orientation": "^5.2.0",
"@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/sqlite": "^5.2.0",
"@ionic-native/sqlite-porter": "^5.2.0",
"@ionic-native/status-bar": "^5.0.0",
"@ionic-native/toast": "^5.1.0",
"@ionic-native/wheel-selector": "^5.1.0",
"@ionic/angular": "^4.0.0",
"@ionic/storage": "^2.2.0",
"cordova-android": "7.1.4",
"cordova-browser": "5.0.4",
"cordova-ios": "4.5.5",
"cordova-plugin-advanced-http": "2.0.5",
"cordova-plugin-badge": "0.8.8",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-file": "6.0.1",
"cordova-plugin-ionic-keyboard": "^2.1.3",
"cordova-plugin-ionic-webview": "^3.1.2",
"cordova-plugin-local-notification": "0.9.0-beta.2",
"cordova-plugin-screen-orientation": "3.0.1",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-plugin-x-toast": "2.7.2",
"cordova-sqlite-storage": "3.1.0",
"cordova-wheel-selector-plugin": "1.1.2",
"core-js": "^2.5.4",
"es6-promise-plugin": "4.2.2",
"highcharts": "^6.2.0",
"plotly": "^1.0.6",
"rxjs": "^6.4.0",
"rxjs-compat": "^6.4.0",
"uk.co.workingedge.cordova.plugin.sqliteporter": "1.1.0",
"zone.js": "~0.8.29"
,
"devDependencies":
"@angular-devkit/architect": "~0.12.3",
"@angular-devkit/build-angular": "~0.12.3",
"@angular-devkit/core": "~7.2.3",
"@angular-devkit/schematics": "~7.2.3",
"@angular/cli": "7.2.4",
"@angular/compiler": "~7.2.2",
"@angular/compiler-cli": "^7.2.6",
"@angular/language-service": "~7.2.2",
"@ionic/angular-toolkit": "~1.4.0",
"@ionic/lab": "1.0.21",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~10.12.0",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^4.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"ts-node": "~8.0.0",
"tslint": "~5.12.0",
"typescript": "~3.1.6"
,
"description": "An Ionic project",
"cordova":
"plugins":
"cordova-wheel-selector-plugin": ,
"cordova-plugin-whitelist": ,
"cordova-plugin-statusbar": ,
"cordova-plugin-device": ,
"cordova-plugin-splashscreen": ,
"cordova-plugin-ionic-webview":
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
,
"cordova-plugin-ionic-keyboard": ,
"cordova-sqlite-storage": ,
"cordova-plugin-x-toast": ,
"uk.co.workingedge.cordova.plugin.sqliteporter": ,
"cordova-plugin-advanced-http": ,
"cordova-plugin-local-notification": ,
"cordova-plugin-screen-orientation":
,
"platforms": [
"ios",
"browser",
"android"
]
请帮我解决这个问题:(
【问题讨论】:
【参考方案1】:这样改变
<preference name="SplashScreenDelay" value="3000" />
<preference name="FadeSplashScreenDuration" value="300" />
【讨论】:
以上是关于Ionic App 在启动画面后显示白屏的主要内容,如果未能解决你的问题,请参考以下文章