I have downloaded and installed jdk 1.8, but when i try to set path to jdk 1.8 in ProjectStructure -> JDK Location, AndroidStudio ignored it, so after set path
click OK and reopen window "ProjectStructure" i see jdk 1.7 again

- 383
- 2
- 4
- 16
-
Did you try to resolve the error shown in the bottom? Maybe it doesn't accept new settings if you do not change this? – Bernhard Aug 22 '16 at 10:55
-
@Bernhard, No, this warning is useless, AS worked fine before i update buildTools to 24.0.1 – Werder Aug 22 '16 at 11:00
7 Answers
I deleted folder with java 1.7, and AndroidStudio open me dialog for specifing jdk-path, whehe i set it. Thank everybody for answering!

- 383
- 2
- 4
- 16
-
It works ! thanks @Werder. note: you should install JDK 1.8 first, you must **delete** not just rename the java 1.7 folder – jajamaharaja Sep 09 '16 at 02:46
This seems to be a bug either in Android Studio 2.1.x or IntelliJ. Here is a workaround after you installed the new JDK and set it as JAVA_HOME
env variable:
- Close Android Studio
- Go to
%HOME%/.AndroidStudio2.1/config/options
(or which version you are using) - rename/delete
jdk.table.xml
- start Android Studio again -> the JDK set in
JAVA_HOME
should be set as default jdk
Reference: https://code.google.com/p/android/issues/detail?id=213239
See also: Android Studio JDK location changes back to 1.7 every time it is updated to 1.8 path
-
This still not help. There is always the previous value in the jdk path. – James Bond Sep 28 '20 at 19:49
I think you need to update your path variable and add your jdk location to it . Studio must be automatically getting path from your environment variable and replacing your path .

- 1,552
- 1
- 15
- 27
The JDK 1.8 does not seem to be fully supported by Android Studio because the Android platform does not support Java 8 as it is currently.
You can see this link for more information. Is JDK 1.8 fully supported by Android Studio?
-
No, i use AndroidStudio 2.1.3, and i have error: Error:Buildtools 24.0.1 requires Java 1.8 or above. Current JDK version is 1.7. – Werder Aug 22 '16 at 10:49
-
There might be an other issue then. Buildtools 24.0.1 should not require Java 8. Looks like preview version of Android N has support for Java 8 https://developer.android.com/preview/j8-jack.html Could you add your gradle files for debugging reference? – Miro Aug 22 '16 at 10:52
use Android Studio 2.2 preview 7 version this only support java 8
Then you can use java 8 features :)

- 362
- 2
- 10
Just move your sdk folder to the small destination folder like C:/sdk. It seems that without setting your sdk folder you can't change the directory of the jdk folder.