Can't get Android SDK Manager to open

☆樱花仙子☆ 提交于 2019-11-28 05:49:03

Open cmd,

go to android sdk folder,

in tools/lib/, edit find_java.bat,

you will see the lines like below, add black line to your file and save.

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 -t') do set java_exe=%%a

this

set java_exe="C:\Program Files\Java\jdk1.7.0_11\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 -t -w')

do set javaw_exe=%%a if not exist %javaw_exe% set javaw_exe=%java_exe%

set javaw_exe="C:\Program Files\Java\jdk1.7.0_11\bin\java.exe"

i hope it helps

Answer by Talha is correct. Just adding that you might need to NOT include quotation marks in the black lines in his solution.

The following addition worked for me:

set java_exe=C:\Program Files\Java\jdk1.7.0_11\bin\java.exe
Johny Johansen

Found out what the cause of this problem was in my case: In the registry, there was a setting to have the CMD using UTF-8 (chcp=65001).

If I double click C:\Programmer\Android\SDK Manager.exe, I get the described symptoms.

If double click C:\Programmer\Android\sdk\tools\lib\SDK Manager.exe there is a hint: A pop-up stating: Failed to execute tools\android.bat

Starting a CMD window in C:\Programmer\Android\sdk\tools and running android.bat, gave no output, even if editing the file and reming out the initial @echo off. Running the command chcp returned 65001.

So changing the codepage with chcp 850 and then running android.bat again, I got output, ending with the line: call lib\find_java.bat. This turned out to be the same problem. Each time a new CMD was spawned, the codepage changed to 65001

Fixed the problem by editing the following registry entry, deleting the value, and everything worked:

HKEY_LOCAL_MACHINE->SOFTWARE->Microsoft->Command Processor->AutoRun: @chcp 65001>nul

Having an empty value here, make the CMD using codepage 850, and the bat files begin to work again.

I am not quite sure what has made this change in the first place, but now I know the cure.

After much searching.......and installing...re-intalling.....and changing the path of the android.bat as the answers above mentioned.....the final solution was: running Eclipse or the bat file or Android studio as administrator in windows 8 for the manager to open up!

check the md5 checksum for eclipse and android SDK.It might be an md5 check sum problem.

for calculating the md5 checksum of files u downloaded you can go to http://www.guidingtech.com/9800/what-is-md5-checksum-how-to-verify-it/

for correct md5 checksum :- 1. for eclipse go to link their official download site click on downloaded package that u downloaded then go to check sum just match it with ur eclipse downloaded file. 2.for android sdk go to http://developer.android.com/sdk/index.html and click on download for other platformsand match the md5 checksum (f09aa4557bd1dc2703fde95dcdd6b92e).

i my case i downloaded all that stuff four times. with regards

ajay

Hossein Fattahian

When extracting the adt-bundle-windows-x86_64-20131030.zip, three files were broken:

("sdk/tools/lib/httpcore-4.1.jar","sdk/tools/lib/find_java.exe","sdk/tools/lib/sdk-common.jar")

I don't know why but you can replace these files using old versions of android SDK e.g. android-sdktools_installer_r20.0.1-windows.exe. It worked for me.

This could also happen if you haven't installed Java on your machine. I had a similar problem but after installing java it worked for me. You can download Java from https://www.java.com/en/download/help/download_options.xml.

Regards, Abhi

AnHuy

Follow these steps and it help for me after a long time with all ways above not effect on windows7 64-bits, no need to have JAVA_HOME system variable or edit android.bat

  1. Download Android Studio within Android SDK, Java JDK 64 bits and Java JRE x86

  2. Install Java JRE first, then install Java JDK 64 bits, and the Android Studio last.

  3. Now you start Android Studio first (64 bits version) it require to have JAVA_HOME setting to run JVM, just copy the jdk.x.x.x(version) folder (my PC: jdk1.8.0_25 from "C:\Program Files\Java\")folder to Android Studio folder and rename that folder (in Android Studio) to "jre" (jdk1.8.0_25 -> jre).

  4. Now it work for me to open Android SDK Manager from anywhere, if you want to use eclipse (not official now) just copy the java jre.x.x.x(version) x86 folder (from where you install before) to Eclipse and rename to "jre". After coping, choose the Android SDK path in Eclipse to use, It works for both Android Studio and Eclipse.

  5. Mind your antivirus if still refusing you (remove antivirus and install after you sure it not cause problem)!

cmd this "android.bat update sdk" ,this way can open "SDK Manager.exe"

note

1."D:\SDK\android-sdk-windows\tools" PATH in enviroment.

2.Replace sdk "tools" folder, this is site -> https://developer.android.com/studio/index.html, then select "Get just the command line tools".(new version deprecated "SDK Manager.exe") this way worked for my Android Studio 2.3

3.and if "android.bat update sdk" can't work, see this video-> https://www.youtube.com/watch?v=FMLVY3PqPlc

I have tried all the above methods none of them worked.If you have already installed jdk-10 or any other then uninstall it and install jdk-8. If you created the path variables then immediately remove the 'JAVA_HOME' variable and also remove the java path from 'PATH' variable. Then install the jdk-8, and try to install sdk manager it works perfectly.

I found another solution, assuming you have Android Studio installed on your system:

  1. Open Android Studio
  2. Open settings (Control + Alt + S)
  3. Locate "Android SDK" setting (Appearance & Behavior -> System Settings)
  4. On the right side, you'll have the SDK related tabs

Try This >

Go to sdk folder

Right Click on Sdk Manager then Run as A administrator . It will open sdk manger and your problem will solve

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