728x90
Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-4.6-bin.zip'
이러한 오류가 발생하였다.
Gradle 프로젝트로된 스프링부트는 의존성을 다음과 같이 가져옴
1. 로컬 gradle 설치되면 gradle 이용해 가져옴
2. 없으면 셋팅된 java로 gradle/wrapper/gradle-wrapper.properties를 보고 설정된 버전의 gradle zip파일을 가져옴
해당 에러는 java버전이 gradle 버전과 맞지 않아서 생긴 이슈다.
에디터에서 java버전을 셋팅해놓는 경우가 있는데
호스트의 java버전과 맞게 gradle을 가져오려면 다음과 같은 파일을 추가하면 된다.
[gradle.properties]
org.gradle.java.home=본인자바설치경로
프로젝트 루트 경로에 넣어주면 된다.
이렇게 한 뒤
다시 프로젝트를 빌드하면 gradle.properties를 먼저 스캔하여 java path에서 gradle을 땡겨오는 명령어를 실행한다.
'서버' 카테고리의 다른 글
| vscode - elementCollection column 참조 오류 (0) | 2025.09.18 |
|---|---|
| vscode - Spring boot 켤 때 java 컴파일 오류 (0) | 2025.09.18 |
| docker - compose.yml로 mariadb 데이터 유지할 수 있도록 셋팅 (0) | 2025.09.08 |
| IntelliJ - 백엔드 작업시 편리한 플러그인 (0) | 2025.09.08 |
| ubuntu - ssh key 생성하기 (0) | 2025.04.28 |