Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phonegap, connection to server unsuccessful

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 are linked as external files). Now, it gives me this error message (after it produces a blank window for 30 seconds or so):

Connection to server was unsuccessful to "www/assets/index.html"

Since the message flashes away, I cannot read anymore. Any help?

like image 523
Dhaivat Pandya Avatar asked Jul 01 '11 16:07

Dhaivat Pandya


1 Answers

What exactly do you mean by "linked as external files"?

The jQuery Mobile and jQuery sources either need to be in the assets/www directory or linked to externally on an accessible cdn site with wireless or mobile data enabled.

There's an example here.

Also, see JQuery Mobile + PhoneGap for Android - Error loading index.html - Within your custom Activity file before calling super.loadUrl add the following line: super.setIntegerProperty("loadUrlTimeoutValue", 60000);

like image 189
Paul Beusterien Avatar answered Oct 26 '22 22:10

Paul Beusterien