2012-10-31 28 views
0

我正在用PhoneGap和Android構建一個移動應用程序,我在應用程序的開始處有一個加載程序,並且在啓動時加載2個圖像,每當網絡速度很慢,下面的消息彈出,應用程序崩潰:Android phonegap file://android_asset/www/index.htm

到服務器的連接失敗。 file:///android_asset/www/index.html

有無論如何處理這個錯誤,即顯示給用戶一條消息,如「連接問題請再試一次」而不是上述消息?

您的幫助非常感謝,因爲我嘗試了很多,我去了super.setIntegerProperty("loadUrlTimeoutValue", 60000);,但我需要一個更好的解決方案。

+0

這裏的答案 http://stackoverflow.com/questions/12319809/application-error-the-connection-to-the-server-was-unsuccessful-file-andr –

回答

1

路徑shoule是: 「文件:///android_asset/www/index.html」

似乎你錯過了一個斜線

+1

你好,這與我的問題無關... –