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

wkdrns5491님의 프로필 이미지
wkdrns5491

작성한 질문수

코드로 배우는 React with 스프링부트 API서버

react 프로젝트 설정 문제

작성

·

257

0

프로젝트를 설정하고 되다가 다시 키니까 안되서 문의드립니다.

제가 java 버전이 3개 정도 설치되어 있는 데 작업할 때 17로 수정해서 쓰고 다른 것 해야 할 때 11로 바꿔서 썼다가 오늘 17로 바꿔서 쓰는 데 자바버전이 안 먹히는 것 같아서 문의 드립니다.

The supplied phased action failed with an exception.

A problem occurred configuring root project 'mallapi'.

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

Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.1.10-SNAPSHOT.

Required by:

project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.1.10-SNAPSHOT:20240229.214127-20

No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.1.10-SNAPSHOT:20240229.214127-20 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.1.10-SNAPSHOT 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.1.10-SNAPSHOT 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.1.10-SNAPSHOT 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.1.10-SNAPSHOT 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.1.10-SNAPSHOT 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.1.10-SNAPSHOT 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')

답변 1

0

구멍가게코딩단님의 프로필 이미지
구멍가게코딩단
지식공유자

에러 메시지를 보면 말씀하신대로 JDK버전 문제인듯 합니다.

 

우선은 build.gradle의 target을 확인하시고.

 

java {
    sourceCompatibility = '17'
}

 

Project Structure의 JDK버전도 체크해 주세요..

 

그리고 가장 중요한 File -> Settings -> Build,Execution... -> Gradle 항목에서

Gradle JVM항목이 17이상인지 체크해 보시기 바랍니다.

 

 

wkdrns5491님의 프로필 이미지
wkdrns5491

작성한 질문수

질문하기