prince
prince

Reputation: 123

Android Studio Installation Error: supplied java-home seems to be invalid

Many people got this error. I have set java variable (JAVA_HOME) and in project structure set jdk path.

But for me it's not working. Here is a screenshot describing problem:

enter image description here

It's giving wrong tried location. Here's a screenshot: structure->module setting jdk location is

    C:\Program Files\Java\jdk1.7.0_67. 

But in error it's showing other location.

Could you tell me how to solve it?

Upvotes: 1

Views: 1643

Answers (4)

prince
prince

Reputation: 123

For me, I am doing very silly mistake. I was using proxy-server. I should use https server in-place of http server.

Upvotes: 1

Tomislav
Tomislav

Reputation: 3211

You need to set up system level JAVA_HOME variable.

Set JAVA_HOME:

Right click My Computer and select Properties.

On the Advanced tab, select Environment Variables, and then create or edit system variable JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.6.0_02.

Also there is PATH variable. You have to append JDK folder and JDK bin folder to that variable. For example:

C:\Program Files\Java\jdk1.6.0_02; C:\Program Files\Java\jdk1.6.0_02\bin

Note the semicolon, you have to use it to separate inputs. After that restart your computer. After restart in CMD prompt try:

echo %JAVA_HOME%

If everything is set up succesfully output should be:

echo %JAVA_HOME%
C:\Program Files\Java\jdk1.6.0_02

Upvotes: 0

Ajithesh N
Ajithesh N

Reputation: 66

  1. You can delete your Java from your system and reinstall the latest version.

check the folder that you've pointed to... That's the problem you got there, The Android Studio couldn't find the JDK. make sure you point Android Studio where your JDK is properly.

Upvotes: 0

R. Suguro
R. Suguro

Reputation: 11

It could be a problem with JDK configuration in you project. You can change this configuration in module settings, as explained in other stackoverflow question below

Android Studio - supplied javaHome is not a valid folder

Upvotes: 0

Related Questions