반응형
1. 문제 상황
A problem occurred configuring root project 'backend'. > Could not resolve all files for configuration ':classpath'. > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.10. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.10 > No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.10 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.0.10 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
대략적인 오류... 이건 뭐다냐...
안드로이드 애뮬레이터 쓰려고 자바 11로 바꿔놓고, 다시 이번 프로젝트에 쓰이는 JDK 17을 다운받아 환경변수도 재설정하였는데도 똑같은 오류가 뜬다.
여기서 내 DB 정보도 잘 바꿔줬는데 ㅎㅎ... 머징
2. 해결
File > Project Settings > Project에 SDK 설정을 안해주었기 때문이다 ㅎㅎ
나는 17버전이니 17버전으로 해주면 된다...
이 2개 부분을 바꿔주었다.
그후File > Settings > Build, Executuin, Deployment > Gradle로 들어와서 설정이 안된 곳을 설정해주면 된다.
자꾸 Gradle 빌드 오류가 뜬 이유가 있었던 것이다...
아래처럼 3곳을 바꿔주었다.
굿
반응형
'BE > Spring' 카테고리의 다른 글
스프링 웹 개발 종류 (0) | 2024.01.03 |
---|---|
cmd로 Spring 실행시키는 법 (빌드란?) (0) | 2024.01.03 |
[Spring] 오늘의 질문 : AOP @Aspect에 빨간줄만 뜨고, 패키지 import가 안될 때 취할 수 있는 방법 (4) | 2023.04.23 |
[Spring] 오늘의 질문 : form에서 파일 넘기는 법, input값이 form에서 넘어가지 않는 이유 (0) | 2023.04.22 |
[Spring] 오늘의 질문 : 등록되지 않은 회원의 접근을 막는 방법은 무엇인가? Interceptor 처리 방법 (0) | 2023.04.22 |