0
点赞
收藏
分享

微信扫一扫

关于Gradle7.0及以上版本报Https的错误的解决方案


今天在升级Android项目的gradle时,遇到如下的一个错误:

关于Gradle7.0及以上版本报Https的错误的解决方案_scala


官方的解释是:

Specifies whether it is acceptable to communicate with a repository over an insecure HTTP connection.

For security purposes this intentionally requires a user to opt-in to using insecure protocols on case by case basis.

Gradle intentionally does not offer a global system/gradle property that allows a universal disable of this check.

*Allowing communication over insecure protocols allows for a man-in-the-middle to impersonate the intended server, and gives an attacker the ability to [serve malicious executable code onto the system.](https://max.computer/blog/how-to-take-over-the-computer-of-any-java-or-clojure-or-scala-developer/)*

大概意思是为了安全,需要要升级成Https,修改的方式有两种。一种是将maven的http修改成为https,另一种是忽略警告,在maven中添加​​allowInsecureProtocol​​,比如:

maven {
allowInsecureProtocol = true
url 'http://developer.huawei.com/repo/'
}


举报

相关推荐

0 条评论