When I clicked SDK Manager on Program Files or run it in cmd
, nothing happened. I did:
And if tools\android
works for you while .exe doesn't, it's probably the x64 java.
It started working when i completely uninstalled JDK with JRE (shows as separate option in windows uninstal control panel applet) and android sdk and reinstalled using x86 version.
Why does it worth the time, you may ask? Well, such an inconsistency obvoiusly means that amount of testing with x64 java is zero and so you can probably experience many other failures in the future.
The way I solved your last problem was by right clicking the android.bat file, and chose edit with notepad++. I then went down to the part of the program where it had this bit of code:
cd /d %~dp0
It was also some other lines of code, but I deleted them. After deleting these other lines I simply just wrote(under the cd /d %~dp0):
cd Program Files
cd java
cd jdk1.7.0_03
cd bin
I dont know here you java.exe file is located but mine was at lest located there.
I solved this problem, which occured for me after manually installing the ADT (4.2/api 17) bundle on Windows 7 64 bit in C:\Program Files.
The steps I had to take:
JAVA_HOME
environment variable to the installation directory of the (64 bit) JDK, C:\Program Files\Java\jdk1.7.0_11
in my case.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:
ANDROID SDK DIRECTORY\tools\android.bat
in your favorite text editorjava_exe= call lib\find_java.bat
(it's split over 2 lines)java_exe="%JAVA_HOME%\java.exe"
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 solved my problem opening android.bat inside sdk/tools
and setting the java_exe
property, which was empty.
set java_exe="C:\Program Files\Java\jre6\bin\java"
I had the same problem, running X64 Java (1.7.0_03-b05)
. Even though I had both C:\Program Files\Java\jre7\bin
and C:\Program Files\Java\jdk1.7.0_03\bin
listed in my path, it wouldn't start - just flashed a command prompt.
The tools\lib\find_java.bat
file was reporting that it was attempting to run C:\Windows\system32\java.exe
but failed. Huh? I checked, and found outdated copies of java.exe
, javaw.exe
and javaws.exe
in my C:\Windows\system32
. How did those get there, I didn't put them there!
I deleted those three files from C:\Windows\system32
and the problem was fixed.
Thinking about it, the problem likely would have been fixed by making sure thatC:\Program Files\Java\jre7\bin
and C:\Program Files\Java\jdk1.7.0_03\bin
were at the START of my PATH variable instead of tacked onto the end.