Ionic-Android平台项目调试时出错:The connection to the server was unsuccessful
2017-09-14 16:46
701 查看
最近都在搞Ionic的项目,今天在将项目中的Android平台代码提到 Android Studio 上调试时,出现下面的错误:
The connection to the server was unsuccessful. (file:///android_asset/www/index.html)
服务器连接失败,在我们的index.html文件中 1、加载的内容过多,2、依赖模块下载超时
我们可以在项目中的文件config.xml下,重新设置请求时间: <platform name="android">
<preference name="loadUrlTimeoutValue" value="600000" />
</platform>由于是在测试Android平台时,才出现的错误,我们针对Android平台进行设置。
这样并不能根本性的解决问题,只是延长了错误提示框弹出的时间,如果超过了我们设置的60s,依赖模块仍然没有下载完,还是会提示错误。
该问题出现在三星设备中,当我更换设备进行测试时,并没有出现这个问题。
The connection to the server was unsuccessful. (file:///android_asset/www/index.html)
服务器连接失败,在我们的index.html文件中 1、加载的内容过多,2、依赖模块下载超时
我们可以在项目中的文件config.xml下,重新设置请求时间: <platform name="android">
<preference name="loadUrlTimeoutValue" value="600000" />
</platform>由于是在测试Android平台时,才出现的错误,我们针对Android平台进行设置。
这样并不能根本性的解决问题,只是延长了错误提示框弹出的时间,如果超过了我们设置的60s,依赖模块仍然没有下载完,还是会提示错误。
该问题出现在三星设备中,当我更换设备进行测试时,并没有出现这个问题。
相关文章推荐
- 解决ionic3 android 运行出现Application Error - The connection to the server was unsuccessful
- [Android_Bug]处理PhoneGap Application Error: "The connection to the server was unsuccessful.(file:///android_asset/www/index.html)"的错误
- Android App启动错误的问题(connection to the server was unsuccessful)
- Application Error - The connection to the server was unsuccessful.
- 【Android调试】 解决The connection to adb is down, and a severe error has occured. ADB server didn't ACK 问
- Application Error - The connection to the server was unsuccessful.
- [置顶] Application Error - The connection to the server was unsuccessful.
- 处理phonegap(cordova) application error the connection to the server was unsuccessful的错误
- eclipse启动Android调试出错:The connection to adb is down, and a severe error has occured.
- PhoneGap开发出现 Application Error - The connection to the server was unsuccessful.
- 关于android运行项目The connection to adb is down, and a severe error has occured。让我们重启eclipse问题
- android 打包出错 Unable to build:the file dx.jar was not loaded from the SDK folder
- android项目调试: java.io.IOException: Unable to open sync connection!
- VMware启动错误信息: The connection to the VMware USB Arbitration Service was unsuccessful
- Exception : The underlying connection was closed: A connection that was expected to be kept alive was closed by the server
- the connection to the VMware USB Arbitration Service was unsuccessful.Please check the status of this service in the Microsogt M
- android中The connection to adb is down ,adb server didn't ACK 问题和解决
- 【错误】:Could not open JDBC Connection for transaction; nested exception is: Communications link failure;The last packet sent successfully to the server was 1 milliseconds ago
- android解决The last packet sent successfully to the server was 0 milliseconds ago. The driver has not
- eclipse运行android项目出现"The connection to adb is down, and a severe error has occured."的问题