[build.gradle 오류] 프로젝트 생성 시 gradle 오류 (spring boot, intelliJ)

zae·2023년 1월 4일
6

TroubleShooting

목록 보기
4/4
post-thumbnail

1. 🚨 문제 발생

A problem occurred configuring root project 'practice'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.1.
Required by:
project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.1
> No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.1 was found. The consumer was configured to find a runtime of a library compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.6' but:

위와 같이 프로젝트 생성build가 되지 않는 문제 발생!

2. 🔨 해결 완료

java versionspring boot version에 맞게 바꿔주면 된다!

spring boot ver.java ver.
3.X (ex: 3.0.1)17~
2.X (ex: 2.0.1)11

본인은 인텔리 제이를 사용했으므로 과정을 나타내면,
file - setting - Build, Execution, Deployment - Build Tools - Gradle 에서 Gradle projectsGradle JVM17 이상으로 해주면 된다. (Spring-goot-gradle-plugin:3.0.1인 경우)

Apply - OK를 누른 뒤 변함이 없다면, build.gradle 에서 build 버튼을 눌러주면 된다!

참고 사이트

profile
코린이 성장 과정! 깊이 있게 파고들 공부를 탐색하고 있습니다 :)

0개의 댓글