After a couple of months with no Android development, I ran the SDK Manager yesterday, and upgraded from r16 to r18. After that upgrade, everything stopped working. I downloaded a fresh copy of the SDK tools from Google. The Windows installer complains there's no Java installed (the solution here , which used to work before, doesn't work).
I downloaded the ZIP file instead and put it in the right place. Running SDK Manager.EXE
does nothing (it just returns immediately to the command prompt). Running tools\android.bat displays an error complaining "Failed to convert path to a short DOS path: c:\windows\system32\java.exe", and then suggests I install Java.
I'm running Windows 7 64-bit, with Java 1.7 (64 bit) properly installed (Eclipse runs well, the Android tools r16 ran very well until yesterday). c:\windows\system32\java.exe exists and works as it should.
What am I doing wrong?
UPDATE: I found an old r16 setup around. I installed it and everything went back to normal.
I put this one aside for a while, but now I had to get it back running. I didn't want to install a 32-bit Java VM alongside the 64 bit one I have.
I found the culprit. in android_sdk\tools\lib
there's a batch-file called find_java.bat
. It calls find_java.exe -s
to find a list of potential Java locations. Running the exe file like this returns the error I've been seeing:
Failed to convert path to short DOS path: c:\windows\system32\java.exe
-s stands for short. Running it without the -s causes find_java.exe to work, causing find_java.bat to work, causing everything else to work. So the fix was to edit find_java.bat, and remove the -s .
I honestly don't know what Google is thinking.
My fix was to remove /bin from my JAVA_HOME, as in C:\Java\jdk1.6.0_26\bin --> C:\Java\jdk1.6.0_26\
I'm running 64bit java on W7.
This google issue was helpful: http://code.google.com/p/android/issues/detail?id=23648
This is just a guess, but I advise you to install JDK 6. It is said in the SDK requirements that you have to use it. I remember that I installed JDK 7 and I had some kind of trouble with it too.
Also it is safer to use the 32-bit version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With