Qt for Android 报错Exception in thread “main“ java.net.ConnectException: Connection timed out: connect

问题描述

编译项目时显示网络超时连接
Exception in thread “main” java.net.ConnectException: Connection timed out: connect

Qt for Android 报错Exception in thread “main“ java.net.ConnectException: Connection timed out: connect_第1张图片

解决办法:

1确定gradle版本

到该项目的gradle-wrapper.properties文件里面查找到你所需要gradle的版本,我这是gradle-3.4-bin.zip
Qt for Android 报错Exception in thread “main“ java.net.ConnectException: Connection timed out: connect_第2张图片
Qt for Android 报错Exception in thread “main“ java.net.ConnectException: Connection timed out: connect_第3张图片

2下载需要的gradle

http://services.gradle.org/distributions/ 下载你需要的版本
Qt for Android 报错Exception in thread “main“ java.net.ConnectException: Connection timed out: connect_第4张图片

3把下载的gradle放到指定目录

我这里目录是 E:\android\gradle-3.4-bin.zip

4重新指定distributionUrl 资源路径

Qt for Android 报错Exception in thread “main“ java.net.ConnectException: Connection timed out: connect_第5张图片

5重新编译项目

Qt for Android 报错Exception in thread “main“ java.net.ConnectException: Connection timed out: connect_第6张图片

你可能感兴趣的:(问题记录站,qt,android)