yeny_lab

빌드 실패 해결 - Gradle JVM의 sdk 설정 필요 | A problem occurred configuring root project 'demo'. | Could not resolve all files for configuration ':classpath'. | Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.1.

2023. 1. 3. 22:12·미분류글
728x90

문제상황

 

clone해온 프로젝트의 Sync 과정에서 아래와 같은 문제 발생!

 

로그 일부 ↓

A problem occurred configuring root project 'demo'.
> 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:
          - Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 declares a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 11
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.6')

 

 

 

문제는??

proejct settings에서 Project SDK랑 Module SDK만 잘 설정해주면 되는 줄 알았는데,

놓친 부분이 있었다.

Gradle JVM까지 바르게 설정해야 한다는 것이다.

 

↓


간단히 해결

 

IntelliJ의 Settings => Build, Execution, Deployment => Gradle 들어가서

Gradle JVM을 제대로 잡아주면 된다.

 

 

내 경우는 gradle JVM을 JAVA_HOME (자바 11로 했음)으로 두고 쭉 사용중이었다.

근데 clone해온 프로젝트는 자바 17을 사용해야 해서, Gradle JVM을 변경해주었다.

project setting만 해서 되는 것이 아니었다.

 

현재 프로젝트와 맞지 않는 설정
적절한 설정

 

 

 

그러면 빌드성공!

나이스 ~ㅅ~

 

 

 

728x90

'미분류글' 카테고리의 다른 글

Intellij 터미널에서 명령어가 안 먹히는 이유  (1) 2023.02.03
미팅1: 계획서 발표 + 파이프라인 조언  (5) 2023.02.02
Join 테이블 전략 (상속관계매핑) 상태에서 부모테이블 truncate하기  (0) 2023.01.27
Docker Container Mysql 접속하기  (1) 2023.01.15
docker 기본 사용법 - 명령어  (0) 2023.01.10
'미분류글' 카테고리의 다른 글
  • 미팅1: 계획서 발표 + 파이프라인 조언
  • Join 테이블 전략 (상속관계매핑) 상태에서 부모테이블 truncate하기
  • Docker Container Mysql 접속하기
  • docker 기본 사용법 - 명령어
히어로맛쿠키
히어로맛쿠키
  • 히어로맛쿠키
    yeny_lab
    히어로맛쿠키
  • 전체
    오늘
    어제
    • 분류 전체보기 (389)
      • 미분류글 (32)
        • ㅇ (2)
      • JAVA (84)
        • Effective Java (1)
        • Application (21)
      • 컴퓨터구조 & OS (28)
      • 자료구조 + 알고리즘 (43)
      • Database (12)
      • 컴파일러 (10)
      • 수학 (33)
        • 미분방정식 (12)
      • 데이터분석과 머신러닝 (38)
      • 기타 (59)
      • yyeeennyy (25)
  • 공지사항

    • ^o^/♡
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.0
히어로맛쿠키
빌드 실패 해결 - Gradle JVM의 sdk 설정 필요 | A problem occurred configuring root project 'demo'. | Could not resolve all files for configuration ':classpath'. | Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.1.
상단으로

티스토리툴바