SDK Manager won't start Windows 7 64-bit?

2019-03-11 23:21发布

问题:

I know this problem has been addressed before several times, but rather than comment on an old question I decided to make a new one with (hopefully) updated information.

As the title says, no matter what I do I cannot get the SDK Manager to run. I have tried installing both the 32- and 64-bit versions of jdk1.7.0 but no luck.

Currently I have both the jdk (32-bit) and the sdk installed in the C:\ directory. As many have said I changed the environment variable below to reflect the locations. Namely:

Variable name: PATH
Variable value:

C:\Android\android-sdk\tools;C:\Java\jdk1.7.0\; C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\

(Obviously I only added the first two values)

Somebody out there must have had the same difficulty setting this up who can help me out here. I had no problem installing everything on my 32-bit Win7 machine, but the 64-bit is my main computer and I really need to have the SDK with me if I am going to learn how to use it.

(EDIT: Solved!)

The problem I was having was that a command prompt window would pop up then the SDK Manager would start to load then instantly crash.

Strangely, someone else with a very similar computer to mine just installed with no problems whatsoever. Weird.

I finally added another environment variable:

Variable name: JAVA_HOME

Variable value: C:\Java\jdk1.7.0\

and it worked!

Thanks for all the help everyone. I hope this can help someone else who might have the same problem.

回答1:

Ok, one on Windows 7 64bit machine the JAVA_HOME trick did work: i.e. set JAVA_HOME = your jdk bin directory. Also add the jdk bin directory to your path.

On my other Windows 7 64bit machine I had more problems. I tried downloading a different find_java.bat - it didn't help. I tried setting ANDROID_SWT=lib\x86_64 - that helped a bit.

Eventually I stuck with the JAVA_HOME and path changes, then skipped installing the android sdk, installed the ADT Plugin into eclipse. From there, after you reboot, you should see SDK Manager available in the eclipse Help menu. I ran it from there and it was all smooth sailing.



回答2:

I was getting the cmd screen showing up briefly then disappearing, added pointer for Java to the path as it was addressed earlier in one of these posts, it did not solve the problem. Then I installed Java SDK, it did not solve the problem. Then I added the Java_HOME variable but it did not solve the problem.

I started navigating via the directory files where the sdk files are installed on the c: drive, it is called "sdk".

  • I found "andoroid" file under "tools" with the file type Windows Batch File.
  • Clicked on it and it opened the sdk manager.


回答3:

Try turning down the strength of the User Access Control settings.



回答4:

I have 64 bit Windows 7 and so far no problems with SDK manager.

I have both 32 and 64 bit JDK's installed (JDK-6, not 7), but Java home points only to 64 bit Java. Check also your registry value for Java home:

HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\1.6.0_20\JavaHome

it should point to your 64 bit JDK. It's better to do it using Java widget from your Control Panel -> Programs



回答5:

Maybe missing two variable settings:

  • set java_exe=%JAVA_HOME% - use JAVA_HOME if you have set system global varibale!

  • for /f %%a in ('%java_exe% -jar %work_dir%\lib\archquery.jar') do set swt_path=lib\%%a Missed local variable which is bold.

I made this changes and it is work for me System: Windows7 x64 IDE: Eclipse JUNO x64



回答6:

I updated my paths the same as this and my SDK started to work.

JAVA_HOME points to my jdk directory

ANDROID_SDK_HOME points to my android sdk directory

ANDROID_SWT points to %ANDROID_SDK_HOME%\tools\lib\x86_64 (yes swt.jar is here)

PATH points to C:\Windows\System32 (yes xcopy.exe is here) and %JAVA_HOME%\bin (yes java.exe is here) and also %ANDROID_SDK_HOME%\platform-tools

Click Here for more info



回答7:

In my case I was having JDK in "C:\Program Files (x86)\Java\" and due to that whenever I use to start SDK both form SDKmanager.exe and through Eclipse it was not coming up.

So I copied JDK in C:/ and updated the path and it started working. (the issue was space in JAVA_HOME path)



回答8:

In order to better debug the problem, run the sdk/tools/android.bat application from the command line. This will likely spit out the error message that is lost if the cmd window closes automatically, such as when you just double click the executable.

Also for completeness of the answers to this question, try running the sdk manager as administrator.



回答9:

Had the same issue. Downloaded all the appropriate files and unzipped into C:\Development folder. Opened Eclipse, Select Windows drop down box. Start SKD Manager from this location. Worked for me!!!!!!!



回答10:

This is my first answer on stackoverflow and I hope it'll help you to figure out your problem.

A. Just go to command prompt and simply type android if you have installed android studio before, it'll work.

B. If you only need to download sdk then open this link follow such steps. After following such steps, go to windows powershell and type choco install android-sdk -y, it will only install the sdk manager. After completing everything go to command prompt and run android as an command. it will figure out your problem.