Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the default JDK for new Android Studio projects?

Every time I create a new project in Android Studio I'm met with the following build error:

Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.

I already know how to change the project settings to use JDK 11, but I'd like to fix this problem permanently for all new projects.

How can I get Android Studio / Gradle to use JDK 11 instead of 1.8 for all new projects?

like image 843
donturner Avatar asked Jan 30 '26 15:01

donturner


1 Answers

I had the same issue

to solve this in Android Studio

go to Menu:

File ->
 settings -> 
    build, execution , Development -> 
      build tools -> 
        gradle ->

set Gradle JDK to be Android studio default JDK (should be version 11 or select version 11)

enter image description here

like image 200
JavaSheriff Avatar answered Feb 01 '26 05:02

JavaSheriff



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!