본문으로 바로가기

[에러 해결] IntelliJ "Could not target platform"

category ERROR 2020. 8. 10. 17:16

인텔리제이로 새로운 스프링 프로젝트를 JDK 11 버전으로 실행하니  Java SE 11' using tool chain: 'JDK 8 (1.8)'. 라는 오류가 발생했다. 아마도 그 전 프로젝트에서 JDK 1.8을 사용해서 발생한 오류같다.

 

 

 

Execution failed for task ':compileJava'.
> Could not target platform: 'Java SE 11' using tool chain: 'JDK 8 (1.8)'.

 

1.  File - Project Structure 에서 Project SDK 의 버전이 '11' 로 설정되어있는지 확인한다.

 (Ctrl + Alt + Shift + S)

 

2. File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle 

Gradle JVM 을 '11'로 설정해준다.

 

 

'ERROR' 카테고리의 다른 글

@WebMvcTest 에러 : JPA metamodel must not be empty!  (3) 2021.02.24