發表於 程式分享

cordova/phonegap執行android apk檔安裝出現"the connection to the server was unsuccessful. (file ///android_asset/www/index.html)"無法執行之處理方式

1.將www/index.html改為main.html

2.新增新的index.html,內容如下

<!doctype html> <html> <head> <title>tittle</title> window.location=’./main.html’; <body> </body> </html>

調整原因:因為原index.html內容過大造成啟動時異常,故用小的網頁內容取代再連結至原網頁即可修正此問題。

發表留言