0

I have set up a new project and when I click on the SDK Manager button, it gives the following error;

ProcessNotCreatedException: Cannot run program 

"C:\Users\User\AppData\Local\Android\sdk\tools\android.bat": CreateProcess error=5, Acces denied: Cannot run program 

"C:\Users\User\AppData\Local\Android\sdk\tools\android.bat": CreateProcess error=5, Acces denied

I have tried running it as an administrator, and also tried to turn down the firewall and anti-virus. But that didn't work.

If someone who maybe had this problem before could help me out, or send me a link to a forum where my problem will be solved, that would be great. Thanks in advance

  • You should probably try Android Enthusiast [http://android.stackexchange.com/] for an answer. – Alex.F Feb 11 '15 at 13:44

1 Answers1

0

You probably don't have java path set in environment variable..
This is how you fix it:

   1. Open up tools/android.bat in your favorite text editor
    2. Search for this piece of code:

   set java_exe= call lib\find_java.bat if not defined java_exe goto :EOF

  3.  Replace it with this:

    set java_exe="D:\Program Files\Java\jdk1.7.0_07\bin\java.exe" 

    where the path is the path to your Java exe. 

 4.   Run android.bat
Saurabh Rajpal
  • 1,537
  • 9
  • 14