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

后端 未结 16 1938
小蘑菇
小蘑菇 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:05

    Here is the working solution

    create a new page main.html

    example:

    
    
      
       tittle
       
      
      
      
    
    

    change the following in mainactivity.java

    super.loadUrl("file:///android_asset/www/index.html");
    

    to

    super.loadUrl("file:///android_asset/www/main.html");
    

    Now build your application and it works on any slow connection

    refernce.

    NOTE: This is a workaround I found in 2013.

提交回复
热议问题