Cannot change gradle JVM from: Build, Execution, Deployment > Build Tools > Gradle
Answered
Hi, the version of my IDE is:

I have several JDK installed in my local machine and I had been working without problems until I updated the IDE to this latest version. The problem is that gradle is not able to pick the correct JDK configured for the project:
And this is the gradle preferences:

I cannot change the "Gradle JVM" from that menu, when I click on "Apply" or "OK" it does not work, is like the button is not enabled or something. Do someone knows a workaround for this?
Please sign in to leave a comment.
Are you able to select other JDKs from the drop-down in the Project Settings dialog?
Do you see the same list of detected JDKs in the 'Gradle JVM' drop-down? If you select a value, does it populate the field?
Do you have this problem in other Gradle projects? Can you test using a new simple project?
1. Yes, I am. I can select whatever JDK I want in the "Project Structure > Project Settings > Project" settings.
2. Yes, I do. I can select the value but when I click on "Apply" or "OK" is not doing anything.
3. Yes, in all Gradle projects, if I create a new one is able to detect the JDK 17 and works, but If I change the "Gradle JVM" is not doing anything like in step 2.
>2. Yes, I do. I can select the value but when I click on "Apply" or "OK" is not doing anything.
Do you mean the "Apply" button is not pressed when you click it?
Please provide the IDE logs (use Help | 'Collect Logs and Diagnostic Data' action to collect it) and the IDE settings zipped (File | Manage IDE Settings | 'Export Settings...' action).
For uploading you can use https://uploads.jetbrains.com or any file sharing service.
Yes, exactly, It's not pressed.
The upload ID is: 2022_03_23_2gyV6Gzcy7P6Nacv
Looks like you have invalid SDKs configuration:
Please try disabling these plugins:
I'd started with Elixir.
That's it! It was Elixir plugin the one that was creating the problem, thank you very much
Great, thanks for the information. I'm glad it is working for you now.
Change Gradle JVM version has no effect.
Running Gradle tasks still results in:
Unsupported Gradle JVM.
Your build is currently configured to use Java 17.0.11 and Gradle 6.6.
Possible solutions:
- Use Java 14 as Gradle JVM: Open Gradle settings
- Upgrade to Gradle 8.5 and re-sync
- Upgrade to Gradle 7.2 and re-sync
Dominic Tobias Gradle 6.6 only supports JDK 14 and earlier.
Please refer to Gradle/JDK Compatibility Table for more information and adjust the Gradle/JDK versions accordingly.
Thanks for your reply. I realized I was doing something silly and had an old branch with Java 13 checked out - Gradle build setting works fine
Encountered this on IDEA 2025.2.4 - I checked the “idea.log” and it was complaining about an invalid SDK for JDK 25. Somehow I had JDK 25 added to my SDK list with its name being set to an empty string. Giving it a name solved the issue for me.