Gradle 7.0 版本构建项目以上就会出现这个问题
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
根据提示的信息的描述:意思就是maven仓库的配置需要引用HTTPS的方式进行;
同时需要针对协议进行限制;
解决方案
在 自己项目的build.gradle
或者 settings.gradle
文件里面加入
pluginManagement {
repositories {
maven {
allowInsecureProtocol true # 中间不需要加 = 号 不然不行
url '你的maven地址,需要是https的'
}
}
}
dependencyResolutionManagement {
repositories {
maven {
allowInsecureProtocol true
url '你的maven地址,需要是https的'
}
}
}
如果没有解决,请留言;