这个错误通常是由于Gradle版本过低导致的,建议升级Gradle版本到5.6或以上。

另外,也可以尝试在项目的build.gradle文件中添加以下代码,禁用allowInsecureProtocol属性:

android {
    //禁用allowInsecureProtocol属性
    System.setProperty('jdk.internal.httpclient.disableHostnameVerification', 'true')
    System.setProperty('jdk.internal.httpclient.allowRestrictedHeaders', '.*')
    //其他配置
}
Android Gradle 错误:'Could not set unknown property 'allowInsecureProtocol'' 解决方法

原文地址: https://www.cveoy.top/t/topic/m899 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录