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 @   endless_?  阅读(721)  评论(0编辑  收藏  举报
编辑推荐:
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· 写一个简单的SQL生成工具
· AI 智能体引爆开源社区「GitHub 热点速览」
点击右上角即可分享
微信分享提示