neatchuck
neatchuck

Reputation: 823

Android Studio keeps changing "project-jdk-name" in misc.xml

We are using Android Studio (currently 3.6) on two machines (macOS).

The .idea/misc.xml file keeps changing the value for project-jdk-name from "1.8" to "1.8 (2)" back and forth.

.idea/misc.xml change

This has been going on for a while (at least since 3.4/3.5). It's happening for all projects. Both installations are configured to use the embedded JDK (Project Structure > SDK Location > JDK location).

Thanks for your help!

Upvotes: 4

Views: 1697

Answers (2)

neatchuck
neatchuck

Reputation: 823

I was able to resolve the issue by following these steps:

  • opening "File > Project Structure > SDK Location"
  • manually selecting a JDK location from "/Library/Java/JavaVirtualMachines/..." (must have another JDK 1.8 installed)
  • clicking "Apply"
  • changing the JDK location back to "Embedded SDK" from the drop menu

After doing this the value for project-jdk-name in .idea/misc.xml remains at "1.8".

Upvotes: 0

Yordan Lyubenov
Yordan Lyubenov

Reputation: 191

I had the similar issue (JDK instead of 1.8 (2)). Check your project's Project Structure's Java SDK. I had 2 options -- Embedded and JAVA_HOME, but they were pointing the same path (Android Studio's embedded one). I had Java 1.8 installed properly but did not have JAVA_HOME set. After I did that AS showed me the JAVA_HOME properly (you might need to restart AS) and after selecting it everything compiled/worked properly.

Upvotes: 2

Related Questions