.... >««(o>...

developer stuff by Joe Healy

Error: Invalid Gradle JDK configuration found. Open Gradle Settings. Platform SDK does notpoint to valid JDK

So I thought I had everything ironed out with my JDK versioning errors after installing 1.8 JDK over 1.7 JDK.  But... I start working through the super simple "Happy Birthday" sample from Udacity's free Intro to Android Studio Class.  Setup a new project and woopsy, get the following:

Course of action to correct.

In Android Studio, navigate to File -> Project Structure -> SDK Location

Set the JDK location to the 1.8 (or whatever is current) correct SDK you wish to use. 

Hopefully all joy and happiness after that. 

I don't know if this fixes the JDK location for all projects.  If it doesn't, there will be another post coming shortly.

"An android," he said, "doesn't care what happens to another android. That's one of the indications we look for."  "Then," Miss Luft said, "you must be an android.”
― Philip K. Dick, Do Androids Dream of Electric Sheep?

ERROR: java-version '1.7' is required / could not find java.dll / could not find Java SE Runtime Environment

I've been learning Android and had installed Java 1.7.  I installed Java 1.8 to get the latest version.  After installing I opened a command prompt and typed in "java -version" to make sure everything had installed properly.  Woops, got the nastiness below!

C:\windows\system32> java -version

Error: Registry key
'Software\JavaSoft\Java Runtime Environment'\CurrentVersion' has value '1.8', but '1.7' is required.
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.


Lots of hits out there about modifying registry and deleting files to fix the error.  Those seemed messy.  Here's a simpler fix that worked for me.

  • Open Control Panel\All Control Panel Items\Programs and Features
  • Uninstall new version of java (1.8)
  • Uninstall old verrsion of java (1.7)
  • Reboot
  • Install java 1.8
  • Set java_home to new variable via ENVIRONMENT to point to the java 1.8 path

Good to go after that point.

C:\windows\system32>java -version java version
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM)64-Bit Server VM (build 25.51-b03, mixed mode)