SDK manager does not find java

后端 未结 6 1074
死守一世寂寞
死守一世寂寞 2020-12-11 17:09

I can\'t fix the issue at hand and my head is continually becoming balder or balder.

The issue at hand is that my SDK manager won\'t find my Java, nor my SWT file.

相关标签:
6条回答
  • 2020-12-11 17:21

    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

    0 讨论(0)
  • 2020-12-11 17:25

    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.

    0 讨论(0)
  • 2020-12-11 17:26

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

    0 讨论(0)
  • 2020-12-11 17:41

    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.

    0 讨论(0)
  • 2020-12-11 17:46

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

    0 讨论(0)
  • 2020-12-11 17:48

    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.

    0 讨论(0)
提交回复
热议问题