Android Studio JDK location changes back to 1.7 every time it is updated to 1.8 path

Figured it out after looking at a few files inside the Android studio settings directory.

If you've been upgrading your Android Studio and importing settings from previous installations, this might happen (it might also happen with a fresh installation).

Solution:

  1. Go to wherever your Android Studio config folder is located (usually at $HOME/.AndroidStudio2.1/confg).
  2. Open the Options folder and delete the file jdk.table.xml (keep a backup just in case)
  3. Restart Android Studio

This fixed the issue for me. The newly created jdk.table.xml will have updated java8 values (which it most probably fetches from the JDK_HOME environment variable).


  1. close android studio

  2. go to :

C:\Users\WINDOW_USER_NAME\AndroidStudio2.1\config\options

open jdk.table.xml

  1. replace all with your JDK version , in my case replaced all with :

    C:/Program Files/Java/jdk1.8.0_101

  2. re-open android-studio

  3. Sync