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

一直都编译的好好的项目突然报错,查了一下原因是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'.
  

猜你喜欢

转载自blog.csdn.net/qq_42071369/article/details/131325239