Recently, I noticed running my App's debug
variant of my first time - meaning installing it the first time, a white screen shows up before splash screen, which stays for quite long time ~ 15 sec on Nexus 6
.
Also happens if I clear data, and run again.
At first I thought it was a side-effect of any patch, so I rolled back to the working published revision.
But the same thing occurred. Although if I install from Play
, it works normally.
So, I ran a 'release' build, and voila! It was working normally. It's obviously not caused by the Application class, or any other code change, as that would happen for the release also.
It's also obviously not the same as brief white screen problem mentioned elsewhere, like this (thread):
So when I applied the transparent theme
to splash
as suggested there, after tapping on the App, the phone screen froze, no touch worked for the same amount of time, then Splash showed.
Not getting any clue why changing to debug
will cause such a huge problem. And why first run only.
It is because you're using Android studio instant run.
You can disable it like this:
Properties -> Instant Run -> uncheck 'Enable Instant Run...'