Flutter Android: 允许使用不安全的仓库并忽略警告配置
在 Flutter 项目的根目录下的 android/build.gradle 文件中,可以通过添加以下代码来允许使用不安全的仓库并且不报警告信息:
allprojects {
repositories {
google()
jcenter()
maven {
url 'http://repo1.maven.org/maven2'
allowInsecureProtocol true
}
}
}
在 maven 仓库的 URL 后添加 allowInsecureProtocol true 即可允许使用不安全的仓库。请注意,使用不安全的仓库可能存在安全风险。
AI 优化版
原文地址:https://www.cveoy.top/t/topic/m83v 著作权归作者所有。请勿转载和采集!