flutter项目运行时一直卡在Running Gradle task 'assembleDebug'... & Could not resolve all dependencies for configuration ':classpath'.

先是看了别人的文章   Flutter项目启动一直卡在Running Gradle task ‘assembleDebug‘问题解决 - 灰信网(软件开发博客聚合) (freesion.com)

做了同样的处理,但接着又报错

A problem occurred configuring root project 'android'.

> Could not resolve all dependencies for configuration ':classpath'.

> Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'maven3(http://maven.aliyun.com/nexus/content/groups/public)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/7.5/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details.

去查了一下,原因如下:

 

 解决方法:

将上面参考别人的文章一二步骤中添加的连接中的 http(下图圈起来的部分) 都改为https,即可运行成功

 

 

posted @ 2023-03-19 14:26  endless_?  阅读(783)  评论(0)    收藏  举报