To change Android Studio’s JDK, follow these steps:

  1. Go to File > Project Structure.

  2. Select the SDK Location section in the list of the left.

  3. Deselect the Use embedded JDK (recommended) option.

  4. Enter the absolute path of your installed JDK in the text box.

    dlg jdk location
  5. Digi also recommends you lower the default memory setting for Gradle (org.gradle.jvmargs property):

    • Create a file called in the root of your project.

    • Enter the following contents and save.

    # Project-wide Gradle settings.
    # IDE (e.g. Android Studio) users:
    # Gradle settings configured through the IDE *will override*
    # any settings specified in this file.
    # For more details on how to configure your build environment visit
    # Specifies the JVM arguments used for the daemon process.
    # The setting is particularly useful for tweaking memory settings.
    # When configured, Gradle will run in incubating parallel mode.
    # This option should only be used with decoupled projects. More details, visit
    # org.gradle.parallel=true