在 Flutter 项目的根目录下的 android/build.gradle 文件中,可以通过添加以下代码来允许使用不安全的仓库并且不报警告信息:

allprojects {
    repositories {
        google()
        jcenter()
        maven {
            url 'http://repo1.maven.org/maven2'
            allowInsecureProtocol true
        }
    }
}

在 maven 仓库的 URL 后添加 allowInsecureProtocol true 即可允许使用不安全的仓库。请注意,使用不安全的仓库可能存在安全风险。

Flutter Android: 允许使用不安全的仓库并忽略警告配置