When i click on AVD Manager, i am getting an error as in the screenshot below.
Referred to the following links. But none of the solution works for me.
Failed
Please check your COMSPEC environment variable (intuitive, I know).
There are apparently some programs that modify this, which in turn break these Android tools (and presumably other programs that rely on .bat files as well).
To check this, in a command window, type
echo %COMSPEC%
The resulting value should probably be C:\Windows\System32\cmd.exe
If you have multiple exes jammed in there, or if the variable ends with a semicolon, you've got a broken COMSPEC variable. If so, please edit your system's environment variables and fix it, setting it to the cmd.exe path above.
I have a x86 system (not x86_64).
in tools\lib\find_jave.bat I replaced:
find /i "x86" > NUL && set arch_ext=32 || set arch_ext=64
With:
rem find /i "x86" > NUL && set arch_ext=32 || set arch_ext=64
set arch_ext=32
Then when android.bat runs, it prints:
The system cannot find the file specified.
Yet it DOES run the SDK manager.
I suspect the 'find' line is broken. If you have a 64 bit system, try setting arch_ext to 64 and test that.
In my case.Android root folder was readonly. -->Remove readonly tick
It needs to copy those " SDK Manager.exe " and "AVD Manager.exe" to the SDK root folder, I needed to copy them to C:\android-sdk\ form Lib Folder, this is because, SDK Manager.exe and AVD Manager.exe are looking for tools
Modifying this file [SDK HOME]\tools\android.bat
rem Check we have a valid Java.exe in the path.
set java_exe= JAVA PATH\jre7\bin\java.exe
* JAVA PATH is in your java sdk folder
and delete these two lines:
call lib\find_java.bat
if not defined java_exe goto :EOF
more here: Issue 42896: SDK Manager fails to open
My android.bat
file was missing when updating the particular SDK package and my computer suddenly shut down. Thus, my tools folder became empty.
You can recover your android.bat
file from temp folder
Manually unzip tools_r23.05-windows or any tool_rXX.zip file (red color)
Get a folder called tools (orange color)
Copy all the file in this folder to the original tools
folder (outside temp folder, e.g. D:\android-sdk\tools)
In my case, the problem was solved this way. Hope this helps.