Can't find java when trying to build for android

Whenever I try to build for android, I get an error that says:
Could not load C:\Program Files (x86)\Java\jre1.8.0_45\bin\client\jvm.dll, error 126

That’s not even the latest version of java, I don’t understand why it’s looking in that folder.

What should I do?

I tried to completely uninstall java, then I installed the x64 version of the java 7u72 development kit.

I tried to build for android and it told me I needed the x32 version of the java 7u72 development kit.

I went and installed that.

Tried to build for android after that and I still got the same error as the one I said in the first post.

You might have a path set to point to Java 1.8. You might have some registry entry too that’s pointing to that version.  You might want to try and un-installing your Java 1.8 first.

Rob

I went and uninstalled every java version I had and then reinstalled the 7u72 development kit. Still no luck.

You said something about registry entries. How do I figure out if I have a registry entry that’s pointing to that version of java?

And you are still getting an error that references Java 8?

Yes.

Since I can’t get into your machine and look around, perhaps using google.com and searching for the error might find a tutorial or even one of our older forum posts that talks about how to undo things.  If you are getting an error referencing Java 8 then something is in your path, or some java home/path variable. Windows hides these things in some system configuration. Your best bet is to use Google and see what you can find. 

Rob

Okay. Thanks for your help.

I tried to completely uninstall java, then I installed the x64 version of the java 7u72 development kit.

I tried to build for android and it told me I needed the x32 version of the java 7u72 development kit.

I went and installed that.

Tried to build for android after that and I still got the same error as the one I said in the first post.

You might have a path set to point to Java 1.8. You might have some registry entry too that’s pointing to that version.  You might want to try and un-installing your Java 1.8 first.

Rob

I went and uninstalled every java version I had and then reinstalled the 7u72 development kit. Still no luck.

You said something about registry entries. How do I figure out if I have a registry entry that’s pointing to that version of java?

And you are still getting an error that references Java 8?

Yes.

Since I can’t get into your machine and look around, perhaps using google.com and searching for the error might find a tutorial or even one of our older forum posts that talks about how to undo things.  If you are getting an error referencing Java 8 then something is in your path, or some java home/path variable. Windows hides these things in some system configuration. Your best bet is to use Google and see what you can find. 

Rob

Okay. Thanks for your help.