SDK manager does not find java

孤街醉人 提交于 2019-11-28 13:31:41

You are using the private JRE for JDK as your Java location suggest

Java location  -  C:\Program Files\Java\jdk1.6.0_24\jre\bin

If you had installed a public JRE (which is available to all Java Applications and not limited to JDK) your Java Location would be something like this

C:\Program Files\Java\jre1.6.0_24\bin

But Android SDK manager can works with private JRE.

Try setting the PATH environment variable for Java.

Refer
How do I set or change the PATH system variable? or
How to Add, Remove or Edit Environment variables in Windows 7?

After you have set the PATH variable start SDK Manager.exe

It should work now.


Edit

You are setting the PATH wrong

Java JDK  -  C:\Program Files\Java\jdk1.6.0_24
Java location  -  C:\Program Files\Java\jdk1.6.0_24\jre\bin

remove the above PATH and set the PATH as

C:\Program Files\Java\jdk1.6.0_24\bin

This should work. It works for me on jdk1.6.0_20


Edit

Did you read

Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM

Install a 64-bit JDK for a 64-bit JVM and set the PATH accordingly.


The question is now getting longer.
Let this question address SDK manager does not find Java and post another question with reference to this question and the other specific error you get.

In case any of you still couldn't find solution. Do this. It worked for me. In your android SDK chagne tools/android.bat and tools/lib/find_java.bat as

(find_java.bat)

for /f "delims=" %%a in ('"%~dps0\find_java.exe" -s') do set java_exe=%%a into

set java_exe=C:\PROGRA~1\Java\JDK17~1.0_4\bin\java.exe and

for /f "delims=" %%a in ('"%~dps0\find_java.exe" -s -w') do set javaw_exe=%%a into

set javaw_exe=C:\PROGRA~1\Java\JDK17~1.0_4\bin\javaw.exe

(android.bat)

for /f "delims=" %%a in ('"%java_exe%" -jar archquery.jar') do set swt_path=lib\%%a into

set swt_path=lib\x86 (my system is 32 bit so i put x86 if your system is 64 then you should put \x86_64)

hope it will work for you too.

gWay

Maybe this help? I removed the .android folder under C:\Users\\ and it works. Android installation/SDK Manager issues

I Had the same problem, what happened in my machine is that somehow the xcopy was not beeing recognized. I solved the issue adding the xcopy path in the PATH enviroment variable. In my machine the xcopy.exe is located in windows\system32 folder, resulting in this (i have sdk 8, change to whatever you using):

PATH = C:\Program Files\Java\jdk1.8.0\bin;%SystemRoot%\system32

It's not a path problem, you need to install jdk 32bits because android sdk is only 32bits.

The only thing that helped me was reinstalling java into a path that did not contain any spaces, so instead of C:/Program Files to C:/Java and change the Path variable to the new value.

Hope this helps.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!