Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

i can't set JDK 1.8 in AndroidStudio

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 enter image description here click OK and reopen window "ProjectStructure" i see jdk 1.7 again enter image description here

like image 573
Werder Avatar asked Aug 22 '16 10:08

Werder


3 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!

like image 181
Werder Avatar answered Oct 18 '22 23:10

Werder


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:

  1. Close Android Studio
  2. Go to %HOME%/.AndroidStudio2.1/config/options (or which version you are using)
  3. rename/delete jdk.table.xml
  4. 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

like image 41
Patrick Favre Avatar answered Oct 18 '22 21:10

Patrick Favre


Uninstall Java JDK7 and install JDK8, or set JDK8 as default Java VM in your OS.

like image 26
AndroidDev Avatar answered Oct 18 '22 21:10

AndroidDev