【Spring依赖编译报错】Could not resolve all files for configuration ‘:classpath‘.

9 篇文章 0 订阅
2 篇文章 0 订阅
项目在使用高版本Gradle时出现编译错误,降低Gradle版本(如从8.0降至7.4)后成功编译。主要问题是无法下载spring-aot、spring-boot等依赖,导致配置根项目失败,服务器返回401状态码,可能与授权或仓库访问问题有关。
摘要由CSDN通过智能技术生成

一直都编译的好好的项目突然报错,查了一下原因是gradle版本太高了,在设置里面把版本降低试试就可以了,我这里把8.0降到7.4就编译成功了,可以多试试几个版本
在这里插入图片描述


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'xxxx'.
> Could not resolve all files for configuration ':classpath'.
   > Could not download spring-aot-gradle-plugin-0.12.0.jar (org.springframework.experimental:spring-aot-gradle-plugin:0.12.0)
      > Could not get resource 'https://repo.spring.io/release/org/springframework/experimental/spring-aot-gradle-plugin/0.12.0/spring-aot-gradle-plugin-0.12.0.jar'.
         > Could not GET 'https://repo.spring.io/release/org/springframework/experimental/spring-aot-gradle-plugin/0.12.0/spring-aot-gradle-plugin-0.12.0.jar'. Received status code 401 from server: 
   > Could not download spring-boot-gradle-plugin-2.7.0.jar (org.springframework.boot:spring-boot-gradle-plugin:2.7.0)
      > Could not get resource 'https://repo.spring.io/release/org/springframework/boot/spring-boot-gradle-plugin/2.7.0/spring-boot-gradle-plugin-2.7.0.jar'.
         > Could not GET 'https://repo.spring.io/release/org/springframework/boot/spring-boot-gradle-plugin/2.7.0/spring-boot-gradle-plugin-2.7.0.jar'. Received status code 401 from server: 
   > Could not download dependency-management-plugin-1.0.11.RELEASE.jar (io.spring.gradle:dependency-management-plugin:1.0.11.RELEASE)
      > Could not get resource 'https://repo.spring.io/release/io/spring/gradle/dependency-management-plugin/1.0.11.RELEASE/dependency-management-plugin-1.0.11.RELEASE.jar'.
         > Could not GET 'https://repo.spring.io/release/io/spring/gradle/dependency-management-plugin/1.0.11.RELEASE/dependency-management-plugin-1.0.11.RELEASE.jar'. Received status code 401 from server: 
   > Could not download spring-boot-buildpack-platform-2.7.0.jar (org.springframework.boot:spring-boot-buildpack-platform:2.7.0)
      > Could not get resource 'https://repo.spring.io/release/org/springframework/boot/spring-boot-buildpack-platform/2.7.0/spring-boot-buildpack-platform-2.7.0.jar'.
         > Could not GET 'https://repo.spring.io/release/org/springframework/boot/spring-boot-buildpack-platform/2.7.0/spring-boot-buildpack-platform-2.7.0.jar'. Received status code 401 from server: 
   > Could not download spring-aot-test-0.12.0.jar (org.springframework.experimental:spring-aot-test:0.12.0)
      > Could not get resource 'https://repo.spring.io/release/org/springframework/experimental/spring-aot-test/0.12.0/spring-aot-test-0.12.0.jar'.
  
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值