Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't get Android SDK Manager to open

Having searched here and elsewhere for answers to my problems, I'm still unable to fix this.

I've installed Eclipse, ADT Plugin, and the Android SDK. My problem is that the SDK Manager won't open, whether it is launched from Eclipse or directly. The command prompt window flashes up briefly, then closes.

I've tried several proposed solutions: Various configurations of my Path and JAVA_HOME variables, installation of the 32 and 64 bit versions of the JDK, running as Administrator, all with no success.

The different components are installed at these paths:

JDK - C:\Program Files\Java\jdk1.7.0_11 JRE - C:\Program Files\Java\jre7 SDK - C:\ADT\sdk 

My JAVA_HOME is set to C:\Program Files\Java\jdk1.7.0_11 My Path includes C:\Program Files\Java\jdk1.7.0_11\bin at the beginning.

I've tried reinstalling the SDK and the installer correctly identifies the location of Java, and yet still it won't work.

Can anyone help me out with this? I'm practically tearing my hair out!

like image 835
Rob S Avatar asked Jan 24 '13 15:01

Rob S


People also ask

How do I open Android SDK Manager?

To open the SDK Manager from Android Studio, click Tools > SDK Manager or click SDK Manager in the toolbar. If you're not using Android Studio, you can download tools using the sdkmanager command-line tool.


2 Answers

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

like image 52
Talha Avatar answered Sep 28 '22 16:09

Talha


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 
like image 29
LauriK Avatar answered Sep 28 '22 16:09

LauriK