Tag Archives: sdk manager

SDK manager cannot open the solution (Android)

Solution 1:
prompt [SDK manager] failed to convert path to a short DOS path: C: \ windows \ system32 \ java.exe
open tools \ lib \ find_ Java.bat file, find
for/F%% a in (‘%~dps0 \ find_java. Exe – s’) do set Java_ exe=%%a
for /f %%a in (‘%~dps0\find_java.exe -s -w’) do set javaw_ Exe =%% a
just remove the – s from it
for/F%% a in (‘%~dps0 \ find_java. Exe’) do set Java_ exe=%%a
for /f %%a in (‘%~dps0\find_java.exe -w’) do set javaw_ exe=%%a

Solution 2:
the SDK manager.exe cannot be opened because of the lack of environment variables. Let’s start setting the environment variables of Android.
right click, my computer — & gt; Properties — & gt; Advanced — & gt; Environment variable.
system variable, new, variable name: Android_ SDK_ Home, the variable value is the path you unzipped to Android SDK windows.
next, we find the path variable in the system variable, click Edit, and enter it in the variable value box.;% ANDROID_ SDK_ HOME%\platform-tools;% ANDROID_ SDK_ HOME%\tools;
two% middle representatives refer to Android_ SDK_ The path to home, and then add tools and platform tools

Solution 3:
open tools \ lib \ find_ Java.bat file:
REM check we have a valid java.exe in the path.
set Java_ exe=call lib\find_ java.bat
if not defined java_ Exe goto: EOF
REM here we set it directly and change it to the absolute path of java.exe on your computer
set Java_ Exe = “E: \ Java \ jdk1.6.0_45 \ bin \ Java. Exe”
REM comment out the following code, which is used to find the path of your java.exe,
REM call lib \ find_ Java. Bat
If “error: SWT folder ” does not exist… Error prompt appears
for/F%% a in (‘% java_exe% – jar lib \ archquery. Jar’) do set swt_path = lib \%% a
REM for/F%% a in (‘% java_exe% – jar lib \ archquery. Jar’) do set swt_path = lib \%% a
set swt_path = lib \ x86 change to your own swt.jar path
call% Java_ exe% %REMOTE_ DEBUG%” “-Dcom.android.sdkmanager.toolsdir=%tools_ dir%” “-Dcom.android.sdkmanager.workdir=%work_ dir%” -classpath “%jar_ path%;% swt_ path%\swt.jar” com.android.sdkmanager.Main %*

Solution 4:
SDK manager.exe confirm the path of java.exe by calling Android SDK windows \ tools \ lib \ find_java.bat.

Enable cmd.exe, switch the command line to Android SDK windows \ tools \ lib, execute find_java.bat, and see the output: C: \ windows \ system32 \ java.exe

Although java.exe exists in this path, it is not the installation path of JRE. It is estimated that it is because some software requiring Java copied java.exe, javaw.exe and javaws.exe to C: \ windows \ system32 during installation, resulting in SDK manager.exe calling java.exe at the wrong location.

Delete java.exe, javaw.exe and javaws.exe under C: \ windows \ system32 \.

Solution 5: the installation path of Android SDK cannot have Chinese, and the installation folder cannot have spaces

Solution 6:

1、 First, ensure that the system variables of JDK and JRE are set correctly. For details, refer to the link: http://www.cnblogs.com/smyhvae/p/3788534.html

2、 Replace tools folder

Go to the website: http://tools.android-studio.org/index.php/sdk Download tools resources from

After downloading, unzip and install it under the tools file, and replace the file