0

I installed Android Studio a month ago and it worked successfully and I was using windows 7(64bit) Then I setup a new windows 7 (32bit) and I reinstalled the JDK and Android Studio and I even downloaded the latest version of Android Studio but it didn't work.

First, a message pop up to set environment variables which I did, then I opened Android Studio again and another message appeared :

Could not find main class com/intellij/idea/main click here to see the error

I searched about that problem and found that the solution is to add JAVA_HOME with value

C:\Program Files\Java\jdk1.8.0_101

Then, I opened it again and it didn't work but no messages appeared. I tried to run the SDK but an error message appeared:

Failed to execute tools\android.bat click here to see the error

Adinia
  • 3,722
  • 5
  • 40
  • 58
  • Open Command Prompt, type: `echo %ANDROID_HOME%` then `where java` and finally `echo %PATH%` and post the results please. – Usman Shahid Amin Aug 25 '16 at 12:12
  • i don't have a variable called ANDROID_HOME so it gave me the same name , there are 2 paths for java C:\ProgramData\Oracle\Java\javapath\java.exe C:\Program Files\Java\jdk1.8.0_101\bin\java.exe –  Aug 25 '16 at 12:33
  • and for Path . C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\Sy stem32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microso ft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn \;C:\Program Files\Java\jdk1.8.0_101\bin –  Aug 25 '16 at 12:34
  • Firstly also post results of `java -version`. And add environment variable `ANDROID_HOME`, set it to path of folder which contains "SDK Manager.exe". Then append `;%ANDROID_HOME%\platform-tools` to the end of `Path` variable – Usman Shahid Amin Aug 25 '16 at 12:54
  • java version : java version "1.8.0_101" Java(TM) SE Runtime Environment (build 1.8.0_101-b13) Java HotSpot(TM) Client VM (build 25.101-b13, mixed mode, sharing) –  Aug 25 '16 at 13:08

0 Answers0