본문 바로가기
안드로이드

Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8 에러 해결

by 코딩히어로 2022. 4. 8.
728x90

안드로이드 AndroidX 진행 후 빌드를 하려 하는데 다음과 같은 에러가 발생하였습니다.

 

Build file 'C:\Users\kimty\Desktop\Today Wolks\20220406\Mykey_Blue_2017_6_13\garin_mykey_blue_van\build.gradle' line: 10

A problem occurred evaluating root project 'garin_mykey_blue_van'.
> 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`.

* 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.

 

해당 에러는 해당 프로젝트의 Sdk에 준하는 Java 버전이 맞지 않다는 것으로

현재 Java version이 1.8로 되어있으므로 Java 11로 올려주기만 하면 해결될 문제입니다.

 

 

안드로이드 스튜디오 상단에 File > Settings... 탭을 클릭합니다.

그다음 Gradle 메뉴에서 Gradle JDK부분에 콤보박스를 눌러

11 version Java를 선택하고 Apply 버튼을 눌러 변경합니다.

 

 

어플을 빌드하면 해당 문제는 해결이 된것을 확인할 수 있습니다.

728x90
반응형

댓글