I am using Android Studio 2022.3.1.18 Version. I am getting this error in this version. JDK location moved to Gradle Can’t change settings
`* What went wrong:
A problem occurred evaluating project ‘:app’.
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.
– changingorg.gradle.java.home
ingradle.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.`
enter image description here
enter image description here
JDK location moved to Gradle Can’t change settings. I can’t find its place in the version I’m using. can you help me ?
2
Answers
First of all you have to install JDK 11 then after move on to
Android Studio
settings -> Build,Execution,Deployment -> Build Tools -> Gradle The Select Java 11 FromGradle JDK
DropdownTry this one
File -> Project Structure -> SDK Location -> Change JDK Location to the Java 11 jdk folder