0

I am using google feeds api in a phonegap app and when the connection gets too slow (as I think) an error saying "The connection to the server was unsuccessful. (file:///android_asset/www/index.html)" pops up instead of loading the app. What should I do to eliminate this error? Please help buddies...

4

2 回答 2

1

在您的主要活动中,增加超时

super.loadUrl("something.com",60000);
于 2013-10-11T02:51:45.693 回答
0

可能是下面的代码帮助你

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    super.setIntegerProperty("splashscreen", R.drawable.splash);
super.loadUrl("file:///android_asset/www/index.html", 10000);
}

这让科尔多瓦等待 10 秒才能启动。

于 2013-10-21T10:22:53.030 回答