Issues:
Connect time out
问题发生在刚打开gradle项目时,往往是gradle-wrapper.properties 文件中的地址连接超时导致。
fix: 用国内镜像仓库来下载.
#Tue Mar 12 21:58:57 CST 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists #distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-8.4-bin.zip #替换此处的url为国内镜像源(腾讯或者其他的) zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists
SSL Peer shut down incorrectly
我这边是使用了代理,切换不同的代理再retry就ok了
Gradle:unable to find valid certification path to requested target
1. try to import the certificate.but no use for me, you can follow other article to try .
2.changed with two steps to fix the issues:
- add file ~/.gradle/gradle.properties with below content, refer:Unable to build a Java project due to certificates - #3 by djKianoosh - Help/Discuss - Gradle Forums
systemProp.javax.net.ssl.trustStore=NUL
systemProp.javax.net.ssl.trustStoreType=Windows-ROOT
- add file ~/.gradle/init.gradle with below aliyun mirror,
allprojects {
buildscript {
repositories {
maven { url 'https://maven.aliyun.com/repository/public/' }
maven { url 'https://maven.aliyun.com/repository/google/' }
}
}repositories {
maven { url 'https://maven.aliyun.com/repository/public/' }
maven { url 'https://maven.aliyun.com/repository/google/' }
}println "${it.name}: Aliyun maven mirror injected"
}