你瞅啥呢

2023-06-18 as运行android项目报错:

完整报错:

复制代码
A problem occurred configuring root project '项目名'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Using insecure protocols with repositories, without explicit opt-in, is unsupported. 
     Switch Maven repository 'maven(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.2/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details. * Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights.
复制代码

原因:在下载gradle的时候使用不安全的http代理导致。

解决方案:修改你的build.gradle文件中的repositories中的maven,在maven中添加allowInsecureProtocol = true,如:

maven{
  url 'http://maven.aliyun.com/nexus/content/groups/public/'
allowInsecureProtocol = true
}

或者你可以直接把http改成https试一试。

注:allowInsecureProtocol即允许不安全协议。

OK,Try Agian。

posted @   叶乘风  阅读(1879)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
点击右上角即可分享
微信分享提示