簡體   English   中英

應用程序加載前顯示在啟動畫面后的白頁(cordova-Android)

[英]White page showing after splash screen before app load (cordova-Android)

我正在開發一個使用inappbrowser加載網站的cordova android應用程序,我不知道為什么我在啟動畫面后有白頁,所以我想擺脫它,這是我的index.html代碼:

 <!DOCTYPE html> <html> <head> <meta name="format-detection" > <meta name="msapplication-tap-highlight" content="no"> <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width"> <title>InApp Browser</title> </head> <body> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="cordova.js"></script> <script type="text/javascript" src="js/app.js"></script> </body> </html> 

這是我的config.xml:

 <?xml version='1.0' encoding='utf-8'?> <widget id="tn.example.inapptest" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>inapptest</name> <description> A sample Apache Cordova application that responds to the deviceready event. </description> <author email="dev@cordova.apache.org" href="http://cordova.io"> Apache Cordova Team </author> <content src="index.html" /> <plugin name="cordova-plugin-whitelist" spec="1" /> <access origin="*" /> <allow-intent href="http://*/*" /> <allow-intent href="https://*/*" /> <allow-intent href="tel:*" /> <allow-intent href="sms:*" /> <allow-intent href="mailto:*" /> <allow-intent href="geo:*" /> <platform name="android"> <allow-intent href="market:*" /> <splash src="res/screen/android/splash-port-hdpi.png" density="port-hdpi"/> <splash src="res/screen/android/splash-port-ldpi.png" density="port-ldpi"/> <splash src="res/screen/android/splash-port-mdpi.png" density="port-mdpi"/> <splash src="res/screen/android/splash-port-xhdpi.png" density="port-xhdpi"/> <icon src="res/screen/android/ldpi.png" density="ldpi" /> <icon src="res/screen/android/mdpi.png" density="mdpi" /> <icon src="res/screen/android/hdpi.png" density="hdpi" /> <icon src="res/screen/android/xhdpi.png" density="xhdpi" /> </platform> <platform name="ios"> <allow-intent href="itms:*" /> <allow-intent href="itms-apps:*" /> </platform> <preference name="SplashScreenDelay" value="50000" /> <preference name="FadeSplashScreen" value="false"/> <preference name="SplashScreenBackgroundColor" value="0xFFFFFFFF"/> <plugin name="cordova-plugin-inappbrowser" spec="~1.4.0" /> <plugin name="cordova-plugin-dialogs" spec="~1.2.1" /> </widget> 

白頁正在顯示由於您的應用程序的主題選擇或可能是登陸頁面,您正在做許多工作,並在主線程中工作。所以,它發生了。

最有可能的主題選擇取決於這個問題。

android:theme="@android:style/Theme.Translucent.NoTitleBar"

有一次我有同樣的問題,我已經在清單文件中設置了這個主題。所以,我已經處理了這個問題。

謝謝,希望這會幫助你:)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM