phonegap, connection to server unsuccessful

前端 未结 5 1888
花落未央
花落未央 2020-12-15 08:35

I\'m trying to write an Android app with phonegap, and I\'m writing a static front page with buttons, which was working until I introduced jQuery mobile and jQuery (which ar

5条回答
  •  Happy的楠姐
    2020-12-15 09:06

    This solved my problem

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.loadUrl("file:///android_asset/www/home/index.html");
        super.setIntegerProperty("loadUrlTimeoutValue", 10000); 
    

    I have added super.setIntegerProperty("loadUrlTimeoutValue", 10000); to com.mypackage.xxx.java file for 10 second waiting waiting time.

提交回复
热议问题