AndroidStudio 较高版本运行时,对我们添加在build.gradle中的仓库地址有限制,不能使用http的仓库地址,只能使用https的仓库地址,但是可能我们的仓库是配置在自己服务上,或者在本地,很少用https,我们可以这样做:
maven{
allowInsecureProtocol = true
url 'https://developer.huawei.com/repo/'
}
只需要在url上在添加一个 allowInsecureProtocol = true 即可通过编译