buildscript { repositories { maven { url 'https://maven.fabric.io/public' } maven { url 'https://maven.aliyun.com/repository/jcenter' } maven { url 'https://maven.aliyun.com/repository/google' } maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } mavenCentral() // add repository } dependencies { classpath 'com.android.tools.build:gradle:3.5.0' } } allprojects { repositories { maven { url 'https://maven.fabric.io/public' } maven { url 'https://maven.aliyun.com/repository/jcenter' } maven { url 'https://maven.aliyun.com/repository/google' } maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } maven { url "https://jitpack.io" } mavenCentral() // add repository } } 复制代码
然后就报标题 错的.
看了下log.发现是https链接失败
最后,把所有的https都改成http.
buildscript { repositories { maven { url 'http://maven.fabric.io/public' } maven { url 'http://maven.aliyun.com/repository/jcenter' } maven { url 'http://maven.aliyun.com/repository/google' } maven { url 'http://maven.aliyun.com/repository/gradle-plugin' } mavenCentral() // add repository } dependencies { classpath 'com.android.tools.build:gradle:3.5.0' } } allprojects { repositories { maven { url 'https://maven.fabric.io/public' } maven { url 'http://maven.aliyun.com/repository/jcenter' } maven { url 'http://maven.aliyun.com/repository/google' } maven { url 'http://maven.aliyun.com/repository/gradle-plugin' } maven { url "https://jitpack.io" } mavenCentral() // add repository } } 复制代码
问题解决