无法获取Android SDK中管理器打开管理器、Android、SDK

2023-09-12 09:15:02 作者:经住风雨我就是王

已经在这里和其他地方的答案我的问题搜索,我仍然无法解决这个问题。

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

我已经安装了Eclipse,ADT插件和Android SDK中。我的问题是,该SDK管理器将无法打开,无论是从Eclipse或者直接启动。在命令提示符窗口闪烁了一下然后关闭。

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.

我试了几个建议的解决方法:我的路径和JAVA_HOME变量的各种配置,安装了32位和64位版本的JDK中,以管理员身份运行,都没有成功。

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

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

我的JAVA_HOME设置为C:\ Program Files文件\的Java \ jdk1.7.0_11 我的道路包括:C:\ Program Files文件\的Java \ jdk1.7.0_11 \ bin在年初

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.

我试着重新安装SDK和安装程序正确识别了Java的位置,但它仍然是行不通的。

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!

推荐答案

打开CMD,

您可以进入Android SDK文件夹,

go to android sdk folder,

在tools / lib目录/,编辑find_java.bat,

in tools/lib/, edit find_java.bat,

您会看到类似下面的线条,添加黑线到您的文件和保存。

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

REM检查,我们有一个有效的java.exe路径。返回code将

rem Check we have a valid Java.exe in the path. The return code will

REM是0,如果命令加工或1,如果执行失败(程序不能

rem be 0 if the command worked or 1 if the exec failed (program not

中)。 FOR / F %%一个在('%〜dps0 \ find_java.exe -t)做设置java_exe = %% A

found). for /f %%a in ('%~dps0\find_java.exe -t') do set java_exe=%%a

设置java_exe =C:\ Program Files文件\的Java \ jdk1.7.0_11 \斌\ java.exe的

如果没有定义java_exe转到:CheckFailed

if not defined java_exe goto :CheckFailed

:SearchJavaW

:SearchJavaW

REM检查如果能够在同一位置找到一个javaw.exe的

rem Check if we can find a javaw.exe at the same location

比的java.exe。 REM如果不工作,只是依傍

than java.exe. rem If that doesn't work, just fall back on the

我们刚刚发现的java.exe。 FOR / F %%一个在('%〜dps0 \ find_java.exe -t -w')

java.exe we just found. for /f %%a in ('%~dps0\find_java.exe -t -w')

做设置javaw_exe = %%一个,如果不存在%javaw_exe%设置javaw_exe =%java_exe%

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

设置javaw_exe =C:\ Program Files文件\的Java \ jdk1.7.0_11 \斌\ java.exe的

我希望它能帮助