解决问题:
1、修改项目中android/build.gradle
文件
将buildscript.repositories
下面的
//google()
//mavenCentral()
注释掉,改成
maven {
allowInsecureProtocol = true
url 'https://maven.aliyun.com/repository/google'
}
maven {
allowInsecureProtocol = true
url 'https://maven.aliyun.com/repository/jcenter'
}
maven {
allowInsecureProtocol = true
url 'http://maven.aliyun.com/nexus/content/groups/public'
}
allprojects.repositories
同上修改
只需要在App项目工程的build.gradle
中,使用allowInsecureProtocol
属性(允许gradle
使用"不安全"的仓库并且不报警告信息)即可
allowInsecureProtocol = true