android sdk and avd manager does not launch on windows 7 x64

后端 未结 9 1169
逝去的感伤
逝去的感伤 2020-12-31 00:49

Can anyone please confirm if android development is not yet supported on windows 7 x64? I downloaded the sdk, but when I tried to launch the sdk and avd manager it fails to

相关标签:
9条回答
  • 2020-12-31 01:17

    For me the problem was solved on windows 8 64 by editing the find_java.bat in the android_sdk/tools/lib folder.

    Basically the for loops that set java_exe and javaw_exe will not work correctly if the path has a white space in it! Ie. "C:\Program Files\Java\jdk" has this, find_java.bat will set java_exe to "C:\Program" which android.bat doesn't like.

    I was ok when i edited find_java.bat like this: (see the two lines after 'rem edit:)

    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).
    for /f %%a in ('%~dps0\find_java.exe -s') do set java_exe=%%a
    rem edit:
    set java_exe="%JAVA_HOME%\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.
    for /f %%a in ('%~dps0\find_java.exe -s -w') do set javaw_exe=%%a
    rem edit:
    set javaw_exe="%JAVA_HOME%\bin\javaw.exe"
    if not exist %javaw_exe% set javaw_exe=%java_exe%
    goto :EOF
    

    HTH

    0 讨论(0)
  • 2020-12-31 01:23

    What worked for me was adding the JAVA_HOME environment variable pointing to the jdk folder (in my case c:\Program Files\Java\jdk1.7.0_04) and adding %JAVA_HOME%\bin to PATH variable

    0 讨论(0)
  • 2020-12-31 01:25

    As one of the comments indicated its C:\android-sdk-windows\tools\lib\find_java.exe and find_java.bat to blame. I have Win7-64bit, no 32bit JavaJRE/JDK installs, one jre7 64bit install. Find_java.bat+exe tool cannot find proper path to 64bit version. I guess you're fine if only 32bit JRE was installed (did not try this).

    • Open DOS console and goto folder C:\android-sdk-windows\tools\lib\
    • run find_java.bat and find_java.exe, you should get "failed to convert path..." and "c:\windows\system32\java.exe" printouts
    • type command set path=c:\Program Files\Java\jre7\bin;%path%
    • run find_java.bat and find_java.exe, you don't get any errors and proper path to c:/program files/java/jre7/bin/java.exe is printed

    If you don't want to mess with Control Panel's environment prefs you could create two batch scripts to run AVD and SDK Manager.

    C:\android-sdk-windows\AVD Manager.bat

    set PATH=C:\Program Files\Java\jre7\bin;%PATH%
    "AVD Manager.exe"
    

    C:\android-sdk-windows\SDK Manager.bat

    set PATH=C:\Program Files\Java\jre7\bin;%PATH%
    "SDK Manager.exe"
    

    This problem and fix was tested on Win7-64bit/Android SDK Tools 20.0.3/Android SDK Platform-tools 14 releases.

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