Using insecure protocols with repositories, without explicit opt-in, is unsupported.解决方案

出现此错误的原因是因为使用了http链接,gradle出于安全考虑必须使用https链接

第一种解决方案是可以加一行参数允许http链接

maven {
		    allowInsecureProtocol = true  //这一行
            url 'xxxxxxx'
      }

第二种方法是将url改为https://xxxxxx

常规出现这种问题的原因就这两种,还有一种配置文件会一层一层引用

android/app/build.gradle -> flutter-tools/flutter.gradle -> C:/Users/XXX/.gradle/init.gradle

其中某一个文件的gradle里出现了http,将其用上面两种问题修正即可解决 

猜你喜欢

转载自blog.csdn.net/qq_36532805/article/details/125118215