运行错误:Application Error - The connection to the server was unsuccessful

 

在模拟器上上启动ionic4.6版本 打包成的android APK,启动了很久结果弹出这个问题:

Application Error - The connection to the server was unsuccessful

问题分析:
PhoneGap某些版本的BUG,尤其在index.html加载的内容较多时容易出现
 
解决方法:

启动时间默认超时默认是20s,现可以延长时间等待;如下操作

在项目目录下的config.xml文件里添加这句,设置一个超时的时间,再重新编译启动;如果还是这样则再增加时间;模拟器运行较慢,建议在真机下启动

<preference name="loadUrlTimeoutValue" value="100000" />
posted @ 2019-03-12 15:47  lusCodding  阅读(2101)  评论(0编辑  收藏  举报