- 原因
gradle同步过程中网络问题容易导致中断 -
解决
使用阿里云镜像 -
buildscript { repositories { //google() //jcenter() maven { url 'https://maven.aliyun.com/repository/public/' } maven { url 'https://maven.aliyun.com/repository/google/'} maven { url 'https://maven.aliyun.com/repository/jcenter/'} mavenLocal() mavenCentral() } dependencies { classpath "com.android.tools.build:gradle:4.0.0" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { //google() //jcenter() maven { url 'https://maven.aliyun.com/repository/public/' } maven { url 'https://maven.aliyun.com/repository/google/'} maven { url 'https://maven.aliyun.com/repository/jcenter/'} mavenLocal() mavenCentral() } }
Gradle sync failed: SSL peer shut down incorrectly”“Read timed out”
于 2023-12-07 17:40:56 首次发布