Search code examples
androidenvironment-variablesjava-homesystem-variable

Why is my JAVA_HOME variable that I setup not working?


I'm trying to install and use Android Studio. However, when I run the program after installing, it gives me this error:

Can't Launch Android Studio

I went into my control panel and added an Environment Variable under System variables that looks like this:

This is my variable I set up

I restarted my computer after making this, but it still doesn't work. Any help?


Solution

  • The issue is that you have a 32-bit installation of the JDK and Android Studio is asking for a 64-bit installation. You can tell it is 32-bit because the path you used for JAVA_HOME is located in 'Program Files (x86)' (where the '(x86)' indicates 32-bit programs). You need to install a 64-bit version of the JDK.