项目改变gradle版本后就报这个错
网上说将
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
改为
distributionUrl=http://services.gradle.org/distributions/gradle-5.1.1-all.zip
试了会报错
Gradle project sync failed Error:Connection reset
追后build.gradle加入 ,编译成功!花了好长时间,特此记录一下。
maven { url"http://jcenter.bintray.com"}
buildscript {
repositories {
google()
jcenter()
maven { url"http://jcenter.bintray.com"}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url"http://jcenter.bintray.com"}
}
}
网友评论