This problem will occur when building the project with Gradle version 7.0 or above
bashUsing insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'maven(XXX)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols
According to the description of the prompted information: it means that the configuration of the maven warehouse needs to reference HTTPS;
at the same time, restrictions need to be imposed on the protocol;
solution
Add it to your project settings.gradle
file
pluginManagement {
repositories {
maven {
allowInsecureProtocol true # 中间不需要加 = 号 不然不行
url '你的maven地址,需要是https的'
}
}
}
dependencyResolutionManagement {
repositories {
maven {
allowInsecureProtocol true
url '你的maven地址,需要是https的'
}
}
}
If it is not resolved, please leave a message;