[Spring dependent compilation error] Could not resolve all files for configuration ':classpath'.

A project that has always been compiled well suddenly reported an error. I checked and found out that the reason was that the gradle version was too high. Just try lowering the version in the settings. I lowered the version from 8.0 to 7.4 and the compilation was successful. You can try a few more times. versions
Insert image description here


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'.
  

Guess you like

Origin blog.csdn.net/qq_42071369/article/details/131325239