Search

클론한 리포지터리 Gradle 로드 오류

태그
IntelliJ
Gradle
생성 일시
2023/07/13 07:22
해결여부
해결

Description

기존에 Github에 존재하던 리포지터리를 새로 로컬에다 클론을 했다.
해당 리포지터리는 이전에 팀프로젝트로 진행했던 JoGuangJo-Back 리포지터리이며
Java 11 버전, Gradle, Spring, Spring Boot, Jpa 를 사용하였으며 MySQL 과 Redis 와 통신작업을 하는 상태이다.
새로 클론을 했더니
User Could not open cp_init generic class cache for initialization script 'C:\Users\d9801\AppData\Local\Temp\sync.studio.tooling.gradle' (C:\Users\d9801\.gradle\caches\7.6.1\scripts\b5ga6gqmk6mumxylm72tcqm6s). > BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 64 * Try: > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Exception is: org.gradle.cache.CacheOpenException: Could not open cp_init generic class cache for initialization script
JSON
복사
Unsupported class file major version 64
JSON
복사
라는 오류가 발생하였다.

Try

1.
프로젝트 구조를 보니 SDK 설정이 안 되어 있었다. 기존에 존재하던거와 같이 설정을 해 주었다.
실패
2.
우측에 존재하는 Gradle 버튼을 열어 기존에 있던 Gradle 을 제거하고 다시 다운해주었다.
성공

Solution

새로 클론한 리포지터리를 IntelliJ 를 통해 열었을때 바로 Grald 프로젝트를 로드하는데
프로젝트 구조를 제대로 설정 안 한 상태로 로드 하다보니 오류가 생겨나는데 이미 로드된 Gradle 프로젝트를 가지고 계속 로드하다보니 오류가 지속적으로 발생한다.
그 경우에 기존에 존재하던 Gradle을 지우고 다시 로드하면 제대로 동작한다.