在升级Android12过程中,当升级了classpath 'com.android.tools.build:gradle:7.0.3'之后,sync gradle时出现如下错误日志
A problem occurred configuring project ':sharesdk_plugin'.
Could not resolve all dependencies for configuration ':sharesdk_plugin:classpath'.
Using insecure protocols with repositories, without explicit opt-in,
is unsupported. Switch Maven repository 'maven(http://mvn.mob.com/android)'
to redirect to a secure protocol (like HTTPS) or allow insecure protocols.
See https://docs.gradle.org/7.0.2/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html
#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details.
解决方法:
找到错误日志中提示的,maven(xxxx),然后增加配置allowInsecureProtocol
maven {
url "http://mvn.mob.com/android"
allowInsecureProtocol = true
}