谷动谷力

标题: Andriod 华为maven库未用https而gradle报错 [打印本页]

作者: 谷谷小师妹    时间: 2023-11-4 17:52
标题: Andriod 华为maven库未用https而gradle报错

Andriod 华为maven库未用https而gradle报错


报错摘要
Caused by: org.gradle.api.InvalidUserCodeException: Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'maven6(http://developer.huawei.com/repo/)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/7.2/dsl/ ... lowInsecureProtocol for more details.  

build.gradle配置
maven { url "http://developer.huawei.com/repo/" }

原因
以前配置的gradle 华为maven未用https, 如今启用了https, 要求强制用的https

解决方法
把http 改为https就能下载使用华为maven库了,改了重新,启动编译,就通过了,不会报错了。






欢迎光临 谷动谷力 (http://bbs.sunsili.com/) Powered by Discuz! X3.2