Execution failed for task ':compileJava'
Error: java: invalid source release: 16
- spring initializr를 통해 스프링부트 프로젝트를 만들었음(빌드툴 : 그레이들)
- main메소드 실행하니 위의 에러 발생
- File -> Project Structure -> Project Settings -> Project SDK
File -> Project Structure -> Module Settings -> Tab: Sources: Language Level
File -> Project Structure -> Module Settings -> Tab: Dependencies: Module SDK
File -> Settings -> Compiler -> Java Compiler -> Target bytecode version
-> 모두 실패
- gradle 버전 문제인 줄 알고 인텔리제이 재설치함 -> 실패
- 자바11을 쓰고 잇었는데 자바 버전문제인줄 알고 자바16 설치 -> 실패
- Preferences -> Build, Excecution... -> Build Tools -> Gradle -> Gradle projects -> Gradle JVM 을 자바16으로 변경
-> 해결