Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”.
Today, the company’s rental project [Optimal Area Life] is about to be launched, but I have been unable to find the cause of a huge problem. That is, when the app that is packaged offline starts, the startup page is about to end, but there is no sudden white screen when it starts rendering, and the white screen is caused by loading content. This almost blew me up for a pure Web front end.
According to the official website document, the delayed closing of the startup screen cannot be solved. Through THE API detection of H5+, it can be confirmed that the startup screen still exists when the screen is blank. WTF, this is a problem, if it is due to the configuration problems of the Android side when packaging, I can be completely layman.
There was no time for me to build Android from scratch, so I became the ghost of the community, trying to find a solution through thousands of posts.
Json file to turn off the alwaysShowBeforeRender configuration that automatically closes before rendering in the app startup page Settings.
To be honest, I tried to configure it in the previous test, but it had no effect until today, this post from a website I don’t understand but has the same content frequently appeared, which made me want to try.
Hey, it worked, but since you canceled the automatic closing of the startup page, you need to configure manual closing in your code.
// APP.vue
onLaunch(){
// H5+app manually closes the startup page interface
plus.naigator.closeSplasnScreen();
}
Copy the code
After that, start the APP again. The loading time of the startup page remains the same, but you can see that the previous blank screen is no longer present.