Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Simple Android App (2014) Getting Started with Android Setting Up an Android Development Environment for Windows

Having trouble installing JDK

I tried setting this solution found on the website: Select Start menu > Computer > System Properties > Advanced System Properties. Then open Advanced tab > Environment Variables and add a new system variable JAVA_HOME that points to your JDK folder, for example C:\Program Files\Java\jdk1.7.0_21.

But I still get an error saying: The environment variable JAVA_HOME (with the value of C:\Program Files\Java\jdk1.7.0_21) does not point to a valid JVM installation.

I would really appreciate if anyone could help me with this because it took 4 hours for me to download and I really want it to work. Thanks in advance!

1 Answer

Hello,

Could you verify a few things? Are Android Studio and Java either both 32 bit or both 64 bit? Did you set the environment variable as a System variable or a user variable? What version of Android Studio are you running? What OS are you running(also is it 32 or 64 bit)? I found a few stackoverflow posts with sitautions similar to this here and here. Please let us know if any of this helps, if not, we can try providing more assistance.

Hi James, I actually somehow installed JDK before I checked back on this but I get the feeling I'm still going to run into problems because there were a bunch of errors I encountered while trying to install it. I can open Android Studio now but I'm still in the process of testing it out. Thanks for taking the time to answer my question though.