Cannot open SDK Manager

混江龙づ霸主 提交于 2019-12-24 21:26:49

问题


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


回答1:


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


来源:https://stackoverflow.com/questions/28455727/cannot-open-sdk-manager

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!