PhoneGap的,连接服务器失败 [英] phonegap, connection to server unsuccessful
问题描述
我试着写出来与PhoneGap的Android应用程序,而我正在写一个静态的头版用的按钮,这是工作,直到我介绍的jQuery移动和jQuery(该链接为外部文件)。现在,它给了我这个错误消息(它会产生一个空白窗口30秒左右的时间):
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):
连接服务器失败,以WWW /资产/ index.html的
Connection to server was unsuccessful to "www/assets/index.html"
由于消息闪烁了,我不能再读书。任何帮助?
Since the message flashes away, I cannot read anymore. Any help?
推荐答案
究竟你的链接外部文件是什么意思?
What exactly do you mean by "linked as external files"?
jQuery的移动和jQuery源要么需要是在资产/ www目录或连接到外部可访问的CDN站点与启用无线或移动数据
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.
这里有一个例子这里。
此外,请参阅<一href="http://stackoverflow.com/questions/6544870/jquery-mobile-phonegap-for-android-error-loading-index-html">JQuery移动+的PhoneGap为Android - 错误加载index.html的 - 在调用super.loadUrl添加以下行之前,你的自定义活动文件:super.setIntegerProperty(loadUrlTimeoutValue,60000);
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);
这篇关于PhoneGap的,连接服务器失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!