我尝试了一些谷歌搜索,但没有任何作用.我最后一次尝试解决的是
hIDeSplashScreen() { if(Splashscreen){ setTimeout(() => { Splashscreen.hIDe(); },100) } };//<preference name="SplashMaintainAspectRatio" value="true"/><preference name="FadeSplashScreenDuration" value="300"/>
请帮我解决这个问题
EDIT ::我的离子信息是
Cordova Cli: 6.4.0 Ionic Framework Version: 2.0.0-rc.4Ionic Cli Version: 2.1.17Ionic App lib Version: 2.1.7Ionic App Scripts Version: 0.0.47ios-deploy version: 1.8.6 OS: OS X El CAPItanNode Version: v6.3.1Xcode version: Xcode 7.2 Build version 7C68解决方法 更新Ionic项目并改变一些偏好对我来说是个窍门.
这里changelog and infos.
1 – 更新到最新版本的Ionic Cli,Cordova和Typescript:
npm uninstall -g ionic cordova typescriptnpm install -g ionic cordova typescript
2 – 更新您的package.Json以匹配以下依赖关系,删除现有的node_modules目录,然后运行npm install:
"scripts": { "build": "ionic-app-scripts build","clean": "ionic-app-scripts clean","ionic:build": "ionic-app-scripts build","ionic:serve": "ionic-app-scripts serve" },"dependencIEs": { "@angular/common": "4.0.2","@angular/compiler": "4.0.2","@angular/compiler-cli": "4.0.2","@angular/core": "4.0.2","@angular/forms": "4.0.2","@angular/http": "4.0.2","@angular/platform-browser": "4.0.2","@angular/platform-browser-dynamic": "4.0.2","@ionic-native/core": "3.6.1","@ionic-native/in-app-browser": "3.6.1","@ionic-native/splash-screen": "3.6.1","@ionic-native/status-bar": "3.6.1","@ionic/storage": "2.0.1","ionic-angular": "3.1.1","ionicons": "3.0.0","rxJs": "5.1.1","sw-toolBox": "3.4.0","zone.Js": "0.8.9" },"devDependencIEs": { "@ionic/app-scripts": "1.3.6","typescript": "2.3.2" }
3 – 使用这些首选项更新您的config.xlm(实时评论可以):
<preference name="loadUrlTimeoutValue" value="700000"/> <preference name="webvIEwbounce" value="false"/> <preference name="UIWebVIEwBounce" value="false"/> <preference name="disallowOverscroll" value="true"/> <preference name="androID-minSdkVersion" value="16"/> <preference name="BackupWebStorage" value="none"/> <preference name="StatusbarStyle" value="default"/> <preference name="SplashScreen" value="screen"/> <preference name="orIEntation" value="default"/> <preference name="SplashMaintainAspectRatio" value="true"/> <preference name="FadeSplashScreenDuration" value="300"/> <preference name="ShowSplashScreenSpinner" value="false"/> <preference name="autoHIDeSplashScreen" value="false"/> <preference name="CordovaWebVIEwEngine" value="CDVWKWebVIEwEngine"/> <preference name="SplashScreenDelay" value="3000"/>
4 – 然后我将一些最近从here修改的代码复制/粘贴到我的项目(Ionic 2演示和最新的应用程序 – 检查Github).
现在应用程序启动成功,不需要长时间的防溅.
PS:
> liverevIEw:ion运行androID -l
>生产:离子运行androID –prod – 释放
>记住,你必须在你的app.component.ts:this.platform.ready().然后(()=> {Splashscreen.hIDe();})手动隐藏闪屏(像@Markus Wagner说)
编辑:更新到Ionic v3.1.1(2017-04-28)
总结以上是内存溢出为你收集整理的白屏后闪屏,Ionic2,android设备全部内容,希望文章能够帮你解决白屏后闪屏,Ionic2,android设备所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)