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。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧