개발 공부 기록
A problem occurred configuring root project 'project_name' 본문
A problem occurred configuring root project 'project_name'
나만없서고냥이 2023. 8. 9. 01:33🚨 문제 발생
A problem occurred configuring root project 'project_name'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.1.2.
Required by:
project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.1.2
> No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.1.2 was found. The consumer was configured to find a library for use during runtime, compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.2.1' but:
- Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.1.2 declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '8.2.1')
위와 같이 프로젝트 생성 시 빌드가 되지 않는 오류가 발생하였습니다.
💡 문제 원인
사용하려는 플러그인의 버전(3.1.2)은 Java 17을 위해 설계되었지만, 해당 프로젝트는 런타임에 Java 11을 사용하도록 설정되어 있어 이러한 불일치 때문에 오류가 발생하였습니다.
🔨 문제 해결
File > Settings > Build, Execution, Deployment > Build Toold > Gradle에서 Gradle Projects의 Gradle JVM을 java 17로 설정합니다. (저는 11로 되어있었습니다..)
OK를 누르고 다시 build를 해줍니다.
'Spring > Trouble Shooting' 카테고리의 다른 글
@Value 사용 시 Cannot find method 'value' (0) | 2023.12.10 |
---|---|
400 Bad Request / Type definition error: [simple type, class cohttp://m.bobjeong.user.dto.request.SignupRequestDto]] (0) | 2023.12.05 |
[Postman/Spring Security] 403 Forbidden 에러 (0) | 2023.11.30 |
java.lang.IllegalArgumentException: Invalid character found in method name 에러 (0) | 2023.11.30 |
SpringBoot 버전에 따른 Java 버전 (0) | 2023.09.09 |