我的系统信息:
Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.3
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
Ionic App Scripts Version: 0.0.48
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.1
Node Version: v6.9.0
Xcode version: Not installed
这是一款Ionic 2应用程序,直到最近一直运行良好。在升级到离子框架Rc3之后,在构建期间它会抛出错误
-Application Error
connection to the server was unsuccessful. File://android_asset/www/index.html
尝试重新安装Android平台和所有。
但即使是基本的应用程序似乎也没有任何效果。
Config.xml文件包含
<description>An Ionic 2 Starter app.</description>
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
...
我已尝试过离子2的启动器模板,它在2台不同的linux机器和Windows机器上也有相同的结果。有趣的是,它在Android模拟器中运行良好,但在移动设备上失败。
任何帮助将不胜感激。
答案 0 :(得分:2)
好的,我已经设法让这个工作,将ionic-apps-scripts降级到0.0.47。添加cordova-device-plugin,最后避免超时问题在config.xml的首选项部分添加此行 -
<preference name="loadUrlTimeoutValue" value="700000" />