先是看了别人的文章

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(仓库服务 to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See UrlArtifactRepository - Gradle DSL Version 7.5 for more details.

去查了一下,原因如下:

解决方法:

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

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐