0

I just downloaded android SDK manager (again...) and installed it on my machine, because I want to use Adnroid Studio. I also installed JAVA JDK (8.0.31). java -version command in cmd returns:

java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

When I try to run android SDK manager I get the message:

   Failed to execute tools\android.bat:,error 2 
   The system cannot find the file specified.

Also, when I run the AVD manager I get the error:

 Failed to execute tools\android.bat:, error 5
 Access id denied.

I made sure that the android.bat file exists in the tools folder, tried to run it directly as an Admin, but it didn't help.
I used the call command in CMD to run android.bat, and this is what I get:
enter image description here

It was working for me a few month ago, but I don't understand what has changed... I searched the web for an answer, but couldn't find one. I'm losing hope. so, if you you can help, I will be grateful.
Thanks!

789
  • 718
  • 1
  • 10
  • 30
  • What folder is `android.bat` in? – Robert Harvey Feb 07 '15 at 19:17
  • i guess you try to run 32-bit sdk on 64-bit os. – Apurva Feb 07 '15 at 19:23
  • In the `tools` folder. I also tried moving it to the root folder, but that didn't help. P.S. notice the edit above. – 789 Feb 07 '15 at 19:23
  • Have you defined the `JAVA_HOME` environmental variable to point towards your JDK directory? – initramfs Feb 07 '15 at 19:27
  • `JAVA_HOME=C:\Program Files\Java\jdk1.8.0_31`. is that what it should be? – 789 Feb 07 '15 at 19:34
  • I downloaded the sdk from [link]http://developer.android.com/sdk/index.html[link] under the option sdk tools only -> windows – 789 Feb 07 '15 at 19:35
  • Yep, something like that. Make sure its a system environmental variable as well in that opening a blank cmd window and typing `echo %JAVA_HOME%` should result in the full path being echoed. – initramfs Feb 07 '15 at 19:37
  • I did it and is shows `C:\Program Files\Java\jdk1.8.0_31` is thak OK? – 789 Feb 07 '15 at 19:59
  • After looking into the `find_java.bat` file which `android.bat` calls, it seems that it can't detect your system's architecture correctly. Try running `reg query "HKLM\Hardware\Description\System\CentralProcessor\0"` directly from the command line and see what pops up. If its an access denied message that'll be your culprit. – initramfs Feb 07 '15 at 20:02
  • is show some keys. what should I be looking for? – 789 Feb 07 '15 at 20:08
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/70484/discussion-between-cpu-terminator-and-789). – initramfs Feb 07 '15 at 20:15

0 Answers0