애플리케이션 실행 도중 아래와 같은 에러 메시지가 발생되었다.
An exception occurred applying plugin request [id: 'com.android.application']
> Failed to apply plugin 'com.android.internal.application'.
> Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
You can try some of the following options:
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing `org.gradle.java.home` in `gradle.properties`.
Android Gradle plugin은 Java 11로 실행되어야 하는데 내가 Java 1.8.을 쓰고 있나보다.
그럼 Java 11로 바꿔주자
File -> Settings
Settings 진입 후, Build, Execution, Deployment 탭 클릭 -> Build Tools 클릭 -> Gradle 진입
Gradle JDK를 11로 변경 후, Apply -> OK 해준다.
만약 다운받아둔 JDK 11이 없다면 Download JDK를 이용해서 다운 받거나, 오라클공홈에서 다운받아 사용할 수 있다.