1,使用了不安全的链接,报错日志如下
Using insecure protocols with repositories, without explicit opt-in, has been deprecated. This is scheduled to be removed in Gradle 7.0. Switch Maven repository 'm
aven(http://maven.aliyun.com/nexus/content/groups/public/)' to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/6.8.3/dsl/or
g.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details.
Configuration on demand is an incubating feature.
解决方法为在使用的链接前加入一句话 ->allowInsecureProtocol = true
“该属性是 allowInsecureProtocol,官方的 Description :Specifies whether it is acceptable to communicate with a repository over an insecure HTTP connection. 翻译过来就是 指定通过不安全的HTTP连接与仓库通信是否可接受,如果该属性的值设置为 true,则表示接受“不安全”的仓库地址”
maven
{
allowInsecureProtocol = true
url 'http://maven.aliyun.com/nexus/content/groups/public'
}
2.如果出现如下信息(这个的报错信息不太记得了。。。反正先试试吧!)
Error:Failed to notify project evaluation listener..
或者
Unable to find method ''org.gradle.api.file.RegularFileProperty org.gradle.api.file.ProjectLayout.fileProperty(org.gradle.api.provider.Provider)'' 'org.gradle.api.file.RegularFileProperty org.gradle.api.file.ProjectLayout.fileProperty(org.gradle.api.provider.Provider)'
我这边的情况是工程拉下来时漏了一个文件夹
解决方法:从其他工程里拷贝这个文件夹过来放到项目对应位置下,?然后看项目的build.gradle文件里的gradle文件是哪个版本的,
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
根据下面的这个表来改上图中gradle-wrapper.properties里面的“
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
”里的gradle版本号
3
--------------------------------------------------------
暂时这么多了,下次遇到什么棘手的问题了再记录
?
|