Application Error - The connection to the server was unsuccessful. (file:///android_asset/www/index.html)

后端 未结 16 1956
小蘑菇
小蘑菇 2020-11-28 01:28

App Dies On Startup (connection to the server was unsuccessful)

I have an Android application that I\'m writing using PhoneGap BUILD. The app was working fine earli

16条回答
  •  囚心锁ツ
    2020-11-28 02:13

    Another reason this error might occur is: there is no index.html in .../YourApp/www/ !

    I just followed the ionic guide, and one of the steps is:

    $ rm www/index.html
    

    On iOS this is no problem as during the build the compiler takes some default HTML instead. However, when building for android, NO example index.html is used. Took me sometime to find out ("WHY does it work on iOS, but not on android...?)

    Easy solution: create a index.html, save it under .../YourApp/www, rebuild ...et voila!

提交回复
热议问题