Skip to main content

Ionic2 - Blank white screen for long time before showing root page

I recently upgraded to ionic2 from ionic1. Ionic2 is better than ionic1 in so many ways but one problem that I started facing in my apps built for android was annoying the hell out of my clients.

Problem was, that before showing the first screen of app (a.k.a root page) there was a blank white screen for approx 10-12 (and sometimes 15) seconds. First I thought it may be because of many plugins installed but problem was there even in a newly created project based on blank template.

How I was building my apk was very simple
cordova build --release android
After completing all the steps listed here I deploy my apk to device. But after little reading on internet about this white screen issue I found that command to generate production ready build is as follows
ionic build android --release --prod
This solved my white screen problem and now my Root page appears just after 1-2 secs of launching my app. 

Comments