重点就就三点
1.设置不自动隐藏splashscreen页面,设置最多延迟10s再关闭,这样可以不显示启动前的白画面
<preference name="AutoHideSplashScreen" value="false" /> <preference name="FadeSplashScreenDuration" value="5000" /> <preference name="ShowSplashScreen" value="true" /> <preference name="ShowSplashScreenSpinner" value="false" /> <preference name="SplashShowOnlyFirstTime" value="false" /> <preference name="FadeSplashScreen" value="true" /> <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="SplashMaintainAspectRatio" value="true" /> <preference name="SplashScreen" value="screen" /> <preference name="SplashScreenDelay" value="10000" /> <preference name="loadUrlTimeoutValue" value="700000" />
2.设置不显示载入的圆圈
<preference name="ShowSplashScreenSpinner" value="false" />
3.目录文件src/app 的app.component.ts中有来确保程序启动后关闭splashscreen页面(不用设置)
platform.ready().then(() => {
Splashscreen.hide();
});
- 4.打包
ionic build android --prod --release
厚积薄发,笨鸟先飞。