无法打开 Android SDK Manager [英] Can't get Android SDK Manager to open

查看:34
本文介绍了无法打开 Android SDK Manager的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在此处和其他地方搜索了我的问题的答案后,我仍然无法解决此问题.

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

我已经安装了 Eclipse、ADT 插件和 Android SDK.我的问题是 SDK Manager 不会打开,无论是从 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.

我尝试了几种建议的解决方案:我的 Path 和 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 FilesJavajdk1.7.0_11
JRE - C:Program FilesJavajre7
SDK - C:ADTsdk

我的 JAVA_HOME 设置为 C:Program FilesJavajdk1.7.0_11My Path 开头包含 C:Program FilesJavajdk1.7.0_11in.

My JAVA_HOME is set to C:Program FilesJavajdk1.7.0_11 My Path includes C:Program FilesJavajdk1.7.0_11in 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.返回码将

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

rem 如果命令有效则为 0,如果 exec 失败则为 1(程序无效

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

找到).for/f %%a in ('%~dps0find_java.exe -t') 设置 java_exe=%%a

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

这个

设置 java_exe=C:Program FilesJavajdk1.7.0_11injava.exe"

如果没有定义 java_exe goto :CheckFailed

if not defined java_exe goto :CheckFailed

:搜索JavaW

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 %%a in ('%~dps0find_java.exe -t -w')

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

如果不存在则设置 javaw_exe=%%a %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 FilesJavajdk1.7.0_11injava.exe"

希望对你有帮助

这篇关于无法打开 Android SDK Manager的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆