Android SDK suddenly stopped working

After a couple of months without developing Android, I launched the SDK Manager yesterday and upgraded from r16 to r18. After this update, everything stopped working. I downloaded a new copy of the SDK tools from Google. The Windows installer complains that Java is not installed (the solution here that previously worked does not work).

I downloaded the zip file and put it in the right place. Starting SDK Manager.EXE does nothing (it immediately returns to the command line). Running the tools \ android.bat displays the error message "Failed to convert the path to the short DOS path: c: \ windows \ system32 \ java.exe", and then offers to install Java.

I am using the 64-bit version of Windows 7 with the correct installation of Java 1.7 (64 bit) (Eclipse works well, Android r16 tools worked very well until yesterday). c: \ windows \ system32 \ java.exe exists and works as it should.

What am I doing wrong?

UPDATE: I found the old r16 setup. I installed it and everything went fine.

+6
source share
5 answers

I put it off for a while, but now I needed to get it back. I did not want to install the 32-bit Java virtual machine along with the 64-bit that I have.

I found a criminal. in android_sdk\tools\lib there is a batch file named find_java.bat . It calls find_java.exe -s to find a list of potential Java locations. Running an exe file like this returns the error I saw:

 Failed to convert path to short DOS path: c:\windows\system32\java.exe 

-s means short. Running it without -s causes find_java.exe to work, forcing find_java.bat to work, forcing everything else to work. So, the fix was to change find_java.bat and remove -s.

I honestly don't know what Google thinks.

+23
source

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 am running 64 bit java on W7.

This google issue was helpful: http://code.google.com/p/android/issues/detail?id=23648

+3
source

This is just an assumption, but I advise you to install JDK 6. The requirements SDK says that you should use it. I remember that I installed JDK 7 and I had problems with it.

It is also safer to use the 32-bit version.

+2
source

You also need to update the Eclipse plugins using the Help> Install New Software.

0
source

I was able to solve the same problem by adding the jdk path to the PATH variable in the environment variables.

0
source

Source: https://habr.com/ru/post/916764/


All Articles