1,先检查build.gradle中各个 maven中是否包含了http开头的url,在后面加上 allowInsecureProtocol = true 或者 allowInsecureProtocol true
maven {
url "http://xxx.com/android"
allowInsecureProtocol = true //或者 allowInsecureProtocol true
}
2,如果你项目中所有 maven 已经加上了 allowInsecureProtocol = true ;或者根本就没 http开头的maven。还是有问题?
那么检查下gradle的全局配置,如我的“ /Users/用户名/.gradle/init.gradle”中的init.gradle配置,是否配置了http开头的maven;
如果有对应的init.gradle也加上allowInsecureProtocol true
另外:你如果用的 “http://maven.aliyun.com”开头的可以直接换成“https://maven.aliyun.com”;maven.aliyun.com已经有https协议的了