'Connection to the server was unsuccessful' error when launching phonegap app on android emulator

后端 未结 3 2134
不知归路
不知归路 2021-02-08 06:33

I am using PhoneGap to build an Android application, the application is a combination of phonegap + jquery mobile.

The application successfully launches in the emulator

相关标签:
3条回答
  • 2021-02-08 07:09

    Use bigger value then 60sec, emulator can be extremely slow.

    super.setIntegerProperty("loadUrlTimeoutValue", 360000);

    and you can refer this also.. Check this!

    0 讨论(0)
  • 2021-02-08 07:19

    I have solved this by adding

    super.setIntegerProperty("loadUrlTimeoutValue", 10000);  
    

    to the com.mypackage.xxx.java file for 10 sec waiting time.ie,

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.loadUrl("file:///android_asset/www/home/index.html");
        super.setIntegerProperty("loadUrlTimeoutValue", 10000); 
    
    0 讨论(0)
  • 2021-02-08 07:21

    This seems to be a phonegap 0.9.3 issue, as other people have reported the same problem (see here or here)

    The problem might be solved by changing the loadUrlTimeoutValue

    this.setIntegerProperty("loadUrlTimeoutValue", 70000);
    
    0 讨论(0)
提交回复
热议问题