Error Case

[Spring Boot / Error] invalid source release: 11

HoSeongYu 2022. 2. 24. 01:03

[문제점]

Spring Boot Gradle 환경으로 Build( ./gradlew clean build )하는 과정에서
invalid source release: 11 에러가 발생했다.

> Task : compileJava FAILED

FAILURE : Build failed with an exception

* What when wrong:
Execution failed for task ':compileJava'.
> invalid source release: 11

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

[원인 추론]

Gradle의 JVM설정이 11이하 버전인데
build.gradle에 sourceCompatibility의 설정이 11로 되어있어 에러 발생.

[해결 방안]

  1. sourceCompatibility 값을 Gradle의 설정 JVM값으로 변경
  2. Gradle JVM설정을 11로 업그레이드