SDK Manager.exe doesn't work
Step #1: Open up a command prompt.
Step #2: Use the cd
command to move to wherever you installed your Android SDK.
Step #3: Run tools\android
.
If that does not work, you should have information dumped to the command prompt that will help you diagnose your setup problem.
I was getting the error "C:\Program is not recognized as an internal or external command" Followed by loads of "unable to copy file" Followed by something about Android_SWT not being able to be found.
The way I fixed the problem on my system (Windows 8, 64 bit, JDK 7) was:
- Create JAVA_HOME environment variable and point it to C:\Program Files\Java\jdk1.7.0_10\bin
- Open
ANDROID SDK DIRECTORY\tools\android.bat
in your favorite text editor - Find the lines set
java_exe= call lib\find_java.bat
(it's split over 2 lines) - Replace the lines with set
java_exe="%JAVA_HOME%\java.exe"
- Save and run
tools\android.bat
The problem was that the the space in the path was not being handled correctly. By wrapping the path in quotation marks, the space is then correctly catered for.
I had the same problem.
when i run \tools\android.bat, i got the exception:
Exception in thread main
java.lang.NoClassDefFoundError: com/android/sdkmanager/Main
My resolved method:
- edit
\tools\android.bat
- find
"%jar_path%;%swt_path%\swt.jar"
- modify to
"%tools_dir%\%jar_path%;%tools_dir%\%swt_path%\swt.jar"
- save, and run
SDK Manager.exe
again
After a lot of searching and trying different methods, I found the solution to the problem at my end: SDK
Manager couldn't find my profile directory. After setting the environment variable ANDROID_SDK_HOME
(I set mine to a newly created folder C:\Android), SDK
manager started no prob.