我们使用阿里镜像去下载库,升级到7.0时会出现以下错误:
opt-in, is unsupported. Switch Maven repository
'maven(http://maven.aliyun.com/nexus/content/groups/public/)' to redirect to a secure
protocol (like HTTPS) or allow insecure protocols.
解决办法:在项目的build.gradle中加入allowInsecureProtocol = true,如下:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven {
url 'http://maven.aliyun.com/nexus/content/groups/public/'
allowInsecureProtocol true
}
google()
jcenter()
mavenCentral()
maven { url 'https://jitpack.io' }
maven { url 'https://dl.bintray.com/youzanyun/maven/' }
maven {
url 'http://developer.huawei.com/repo/'
allowInsecureProtocol true
}
maven { url 'https://dl.bintray.com/umsdk/release' }
}
}
allprojects {
repositories {
maven {
url 'http://maven.aliyun.com/nexus/content/groups/public/'
allowInsecureProtocol true
}
google()
jcenter()
mavenCentral()
maven { url 'https://jitpack.io' }
maven {
url 'http://developer.huawei.com/repo/'
allowInsecureProtocol true
}
maven { url 'https://dl.bintray.com/umsdk/release' }
}
}
联系客服