Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository
时间: 2023-09-25 20:06:27 浏览: 243
Using 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仓库时,使用不安全的协议(如HTTP)而没有明确的授权是不被支持的。解决方法有两种:
1. 在项目的build.gradle文件中添加关键字allowInsecureProtocol,并设置为true,例如:
maven {
allowInsecureProtocol = true
url 'xxx'
}
2. 将Maven仓库的地址URL从HTTP改为HTTPS,例如:
maven {
allowInsecureProtocol true
url 'https://maven.aliyun.com/nexus/content/groups/public/'
}
要解决这个问题,您可以根据上述方法之一进行操作。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven...](https://blog.csdn.net/qq_22255311/article/details/122600752)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [解决Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch ...](https://blog.csdn.net/wanghonghongkx/article/details/128611987)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文