4

I'm trying to instal Android Studio for Windows but I get an error: "Could not find main class com/intellij/idea/Main"

I installed the 64 bit jdk and created an environment variable called JAVA_HOME and linked this to my jdk as so: "C:\Program Files\Java\jdk1.7.0_71"

Guest
  • 83
  • 2
  • 9

4 Answers4

1

Are you sure you have installed 64bit ?

Generally for 64bit installation default path will be "c:\Program Files (x86)\Java\jdk1.7.0_71"

Another thing to check if your java installation ( 64bit is compatible ) is fine.

a. open command prompt.

b. cd {your java installation}\jdk1.7.0_71\bin

c. type "java" and "java -version" ( See if both command works )

nobalG
  • 4,544
  • 3
  • 34
  • 72
Shivakumar ss
  • 653
  • 7
  • 19
  • I have both 32 and 64 bit JDK installed. Originally I had the 32 bit JDK but when installing Android Studio it said I needed to have 64, so I went ahead and installed 64bit JDK. Also, both commands DO work. – Guest Nov 24 '14 at 16:53
  • Then you have to make sure JAVA_HOME is pointing to 64 bit Java SDK. post that restart your Android studio and try. – Shivakumar ss Nov 24 '14 at 16:57
  • "C:\Program Files\Java\jdk1.7.0_71" thats where my JAVA_HOME is pointing to. I've already tried all of this. I even restarted my computer. Doesnt work! – Guest Nov 24 '14 at 17:17
  • Please try http://stackoverflow.com/questions/16574189/android-studio-installation-on-windows-7-fails-no-jdk-found a similar issue is encountered and fixed. – Shivakumar ss Nov 24 '14 at 17:20
  • Doesn't seem very helpful. I've made the JAVA_HOME and JDK_HOME variables with the correct values and I still dont get anything :( – Guest Nov 24 '14 at 18:21
1

Having JAVA_HOME set to point latest JDK version (C:\Program Files\Java\jdk1.7.0_79) will make the Android studio work. Make sure the path is correct. Seems that JDK_HOME is not needed.

Kajal
  • 206
  • 2
  • 8
0

Add a system variable JDK_HOME with value c:\Program Files\Java\jdk1.7.0_71\

B.Moataz
  • 97
  • 4
  • if you read the question you'll realise I've already done that – Guest Nov 24 '14 at 17:15
  • Your question mentions you've added ``JAVA_HOME`` @Abdul-MaliKR is saying to add ``JDK_HOME`` and point to the same path that is what I have on my setup and never had a problem – Boardy Nov 24 '14 at 17:23
  • misread that! So should I also remove JAVA_HOME or keep both? @Boardy – Guest Nov 24 '14 at 17:25
  • @Boardy Still doesnt work. I even restarted my computer – Guest Nov 24 '14 at 17:34
  • Hmm, strange, have you also got a JRE installed as this also needs to be installed and match the JDK, i.e. both x86 or x64 – Boardy Nov 25 '14 at 09:44
0

Just install java jdk and jre and runtime environment and java 8 update 45 in 64 bit if your computer is 64 bit and 32 bit if your computer is 32bit and then in your environment variable just remove the /bin from it.

Shrey
  • 1
  • 1