Android SDK and AVD Manager will not run

前端 未结 13 1352
被撕碎了的回忆
被撕碎了的回忆 2020-12-10 04:37

I installed the Android SDK but I cannot use it because the AVD and SDK Managers do not run. When I try to open either one of them, a command prompt window pops up for about

13条回答
  •  借酒劲吻你
    2020-12-10 05:02

    There may be an issue with \tools\lib\find_java.bat not successfully determining the location of the java.exe and javaw.exe executables.

    The workaround here: http://www.gmansoft.com/android-sdk-manager-find-java-problem/ worked for me. Note that if you "fix" the problem in android.bat other batch files will still be broken.

    In case the above link breaks, the workaround is to hardwire the results of find_java.bat to return the actual location of the java executables. e.g. edit it to be something like:

    rem Check we have a valid Java.exe in the path. The return code will
    rem be 0 if the command worked or 1 if the exec failed (program not found).
    rem for /f "delims=" %%a in ('"%~dps0\find_java%arch_ext%.exe" -s') do set java_exe=%%a
    set java_exe=c:\program files\Java\jdk1.8.0_25\bin\java.exe
    if not defined java_exe goto :CheckFailed
    
    :SearchJavaW
    rem Check if we can find a javaw.exe at the same location than java.exe.
    rem If that doesn't work, just fall back on the java.exe we just found.
    rem for /f "delims=" %%a in ('"%~dps0\find_java%arch_ext%.exe" -s -w') do set javaw_exe=%%a
    set javaw_exe=c:\program files\Java\jdk1.8.0_25\bin\javaw.exe
    if not exist "%javaw_exe%" set javaw_exe=%java_exe%
    goto :EOF
    

提交回复
热议问题