简体   繁体   English

tools \\ android.bat文件不在android studio中执行

[英]tools\android.bat file doesn't execute in android studio

I tried to execute SDK manager from android studio but I got an error message saying system cannot find the path specified. 我尝试从android studio执行SDK管理器,但收到一条错误消息,提示系统找不到指定的路径。

7:38:44 AM ProcessNotCreatedException: Cannot run program "C:\Program Files\Android\android sdk\tools\android.bat": CreateProcess error=2, The system cannot find the file specified: Cannot run program "C:\Program Files\Android\android sdk\tools\android.bat": CreateProcess error=2, The system cannot find the file specified

I can clearly see sdk.exe, avd.exe files in SDK folder as well as in \\android sdk\\tools\\lib folder. 我可以在SDK文件夹以及\\android sdk\\tools\\lib文件夹中清楚地看到sdk.exe, avd.exe文件。

Also I can see android.bat file as \\sdk\\tools\\android.bat but when i try to execute it says the path cannot be found. 我也可以将android.bat文件视为\\sdk\\tools\\android.bat但是当我尝试执行该文件时,找不到该路径。

I tried copy android.bat file to \\sdk\\ but still its same. 我尝试将android.bat文件复制到\\sdk\\但仍然相同。 Can anyone please help me to fix this issue? 谁能帮我解决这个问题?

Hey give the guy a break, its really frustrating when you just want to learn and come up against issues like this 嘿,给那个家伙一个休息吧,当您只想学习并面对这样的问题时,这真的令人沮丧

Hope this helps , it worked for me . 希望这对我有帮助。

In your environment variables check the CommSpec variable value is set to C:\\Windows\\system32\\cmd.exe. 在您的环境变量中,检查CommSpec变量值是否设置为C:\\ Windows \\ system32 \\ cmd.exe。

It might be corrupted or something like C:\\Windows\\system32\\cmd.exe; 它可能已损坏或类似C:\\ Windows \\ system32 \\ cmd.exe; another-path 另一路

I had to resset my path to C:\\Windows\\system32\\cmd.exe and my SDK mamanger worked 我必须将路径重置为C:\\ Windows \\ system32 \\ cmd.exe,并且我的SDK mamanger正常工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM