인프런 커뮤니티 질문&답변

kks9612161님의 프로필 이미지
kks9612161

작성한 질문수

스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술

프로젝트 생성관련 문의입니다.

작성

·

176

0

java sdk는 11 ,17이 있는데 계속 A problem occurred configuring root project 'hello-spring'.

> Could not resolve all files for configuration ':classpath'.

> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.2.1.

Required by:

project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.2.1

> No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.2.1 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.5' but:

- Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 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.5')

- Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a component for use during runtime, and its dependencies declared externally:

- Incompatible because this component declares documentation and the consumer needed a library

- Other compatible attributes:

- Doesn't say anything about its target Java version (required compatibility with Java 11)

- Doesn't say anything about its elements (required them packaged as a jar)

- Doesn't say anything about org.gradle.plugin.api-version (required '8.5')

- Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.2.1 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.5')

- Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.2.1 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:

- Incompatible because this component declares a component, compatible with Java 17 and the consumer needed a component, compatible with Java 11

- Other compatible attribute:

- Doesn't say anything about org.gradle.plugin.api-version (required '8.5')

- Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:

- Incompatible because this component declares a component, compatible with Java 17 and the consumer needed a component, compatible with Java 11

- Other compatible attribute:

- Doesn't say anything about org.gradle.plugin.api-version (required '8.5')

- Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a component for use during runtime, and its dependencies declared externally:

- Incompatible because this component declares documentation and the consumer needed a library

- Other compatible attributes:

- Doesn't say anything about its target Java version (required compatibility with Java 11)

- Doesn't say anything about its elements (required them packaged as a jar)

- Doesn't say anything about org.gradle.plugin.api-version (required '8.5')

sdk를 바꿔봐도 이런 오류가 뜨는데요.. 스프링 프로젝트 설정을 뭐로 해야할지 모르겠습니다 ㅠㅠ 계속 해매고 잇네요

답변 1

0

안녕하세요. kks9612161님, 공식 서포터즈 y2gcoder입니다.

첨부해주신 에러 메시지만으로 판단했을 때는 스프링부트 3.2.1 버전의 프로젝트를 jdk 11을 이용해서 구동하려고 해서 해당 메시지가 발생하는 것으로 보입니다!

IDE에서 구동하려고 하시는 거라면 자주하는 질문(클릭)을 참고하셔서 제대로 jdk 17버전으로 설정되어 있는지 확인해주시고, 혹시 터미널에서 명령어를 입력해 build하는 과정에서 해당 오류가 나타나신다면, 해당 터미널에서 java --version 을 입력하여 jdk 17이 환경변수로 지정되어 있는지 확인해주십쇼!

감사합니다.

kks9612161님의 프로필 이미지
kks9612161

작성한 질문수

질문하기