Android SDK中管理器将无法运行管理器、Android、SDK

由网友(空山梦)分享简介:我在用JAVA JDK 7u7在Windows 7专业版64位。i'm on a Windows 7 Pro x64 with java jdk 7u7.我试着在我的电脑上安装Android SDK,但是当我推出的 SDK的manager.exe ,一个DOS窗口正在打开,并立即关闭。于是,我就发动工具/ andr...

我在用JAVA JDK 7u7在Windows 7专业版64位。

i'm on a Windows 7 Pro x64 with java jdk 7u7.

我试着在我的电脑上安装Android SDK,但是当我推出的 SDK的manager.exe ,一个DOS窗口正在打开,并立即关闭。于是,我就发动工具/ android.bat 。但是,没有工作,这对我说的是:

I try to install the Android SDK on my computer, but when i launch SDK Manager.exe, a dos-windows is opening and instantly closing. So i tried to launch tools/android.bat. But that didn't work, it say to me that :

"'C:PROGRA~2AndroidANDROI~1toolslibfind_java.exe -s' isn't a external or internal command ...

ERROR No suitable java such ..."

我有修正错误做的:

What i have do for fix error :

安装Java 6u35 安装Java X32和x64 检查我的路径启动管理员安装在C:开发的SDK 与android-sdk.zip或Android的sdk.exe安装在路径中添加的android目录

但这种尝试的人是成功的。有人能帮助我吗?

But anyone of this try was successful. Someone can help me?

推荐答案

似乎有几种方式来启动SDK管理器:

There appear to be several ways to launch the SDK Manager:

SDK的manager.exe 在Android SDK的根。 SDK的manager.exe SDK 工具 lib目录 Android SDK的。 窗口 - >在Eclipse Android SDK中经理菜单 android.bat 在Android SDK的 SDK 工具SDK Manager.exe in the root of the Android SDK. SDK Manager.exe in sdktoolslib of the Android SDK. Window -> Android SDK Manager menu in Eclipse android.bat in sdktools of the Android SDK.

在我的情况下,它看起来像 android.bat 失败就行了:

In my case, it looks like android.bat fails on the line:

for /f %%a in ('%java_exe% -jar libarchquery.jar') do set swt_path=lib%%a

至于什么该行正在做......如果我手动运行:[path_to_java] Java的罐子的lib archquery.jar

它成功返回: x86_64的

但是,当批处理文件运行相同的命令,我不知道为什么,但它失败,出现错误消息:

But when the batch file runs that same command, I don't know why but it fails with the error message:

Unable to access jarfile libarchquery.jar

所以变量 swt_path 被设置为空字符串。一切都从那里打破了。

So the variable swt_path gets set to an empty string. Everything breaks down from there.

该批处理文件设置正确的值变量 java_exe 。其他人通常报告这是一个问题,但这些解决方法不是在我的案件有关。

The batch file sets the correct value for the variable java_exe. Others have commonly reported this as a problem, but those workarounds weren't relevant in my case.

人们已经建议将REM到它的开始,并添加一行手动设置 swt_path 变量,这是一个有效的解决方法注释掉的问题行:

People have recommended commenting out the problem line by adding REM to the beginning of it, and adding a line to manually set the swt_path variable, which is a valid workaround:

REM for /f %%a in ('%java_exe% -jar libarchquery.jar') do set swt_path=lib%%a
set swt_path=libx86

BUT 后,在我的情况下,关键的问题是,它选择以直接从的lib X86 加载一个jar文件或这里的lib x86_64的文件夹中。在某些时候,事情逐渐BAT文件错误之间迷茫,一个32位的JDK和一个64位的Andr​​oid SDK。

BUT, the critical issue in my case is that it's choosing to load a jar file from either the libx86 or the libx86_64 folder here. At some point, things were getting confused between the BAT file error, a 32-bit JDK, and a 64-bit Android SDK.

SO 后,在我的情况的解决方法是:

SO, the workaround in my case was to:

卸载所有Java版本安装JDK您既可以使用32位的Andr​​oid SDK和安装32位JDK 或者使用64位的Andr​​oid SDK和安装64位JDK 但是JDK中的位数应与Android的SDK。看来,无论是32位或64位将在64位电脑上工作,只要JDK位数Android SDK中位数相匹配。

编辑android.bat

Edit "android.bat"

如果使用32位的Andr​​oid SDK / JDK中,使用的lib X86

REM for /f %%a in ('%java_exe% -jar libarchquery.jar') do set swt_path=lib%%a
set swt_path=libx86

如果使用64位的Andr​​oid SDK / JDK中,使用的lib x86_64的

REM for /f %%a in ('%java_exe% -jar libarchquery.jar') do set swt_path=lib%%a
set swt_path=libx86_64

这样做后,我可以成功运行 android.bat ,或从Eclipse菜单(但是仍然没有被运行的是 SDK的manager.exe 直接文件)。

After doing this, I can successfully run the SDK Manager by running android.bat, or from the Eclipse menu (but still not by running either of the SDK Manager.exe files directly).

阅读全文

相关推荐

最新文章