Android SDK中管理器将无法运行 [英] Android SDK Manager will not run

查看:171
本文介绍了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窗口正在打开,并立即关闭。于是,我就发动工具/ 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~2\Android\ANDROI~1\tools\lib\\find_java.exe -s' isn't a external or internal command ...

ERROR No suitable java such ..."

我有修正错误做的:

What i have do for fix error :


  1. 安装Java 6u35

  2. 安装Java X32和x64

  3. 检查我的路径

  4. 启动管理员

  5. 安装在C:\\开发的SDK

  6. 与android-sdk.zip或Android的sdk.exe安装

  7. 在路径中添加的android目录

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

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

推荐答案

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

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


  1. SDK的manager.exe 在Android SDK的根。

  2. SDK的manager.exe SDK \\工具\\ lib目录 Android SDK的。

  3. 窗口 - >在Eclipse Android SDK中经理菜单

  4. android.bat 在Android SDK的 SDK \\工具

  1. SDK Manager.exe in the root of the Android SDK.
  2. SDK Manager.exe in sdk\tools\lib of the Android SDK.
  3. Window -> Android SDK Manager menu in Eclipse
  4. android.bat in sdk\tools 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 lib\archquery.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 lib\archquery.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 lib\archquery.jar') do set swt_path=lib\%%a
set swt_path=lib\x86

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 lib\x86 or the lib\x86_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:


  1. 卸载所有Java版本

  2. 安装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 lib\archquery.jar') do set swt_path=lib\%%a
set swt_path=lib\x86


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

    REM for /f %%a in ('%java_exe% -jar lib\archquery.jar') do set swt_path=lib\%%a
    set swt_path=lib\x86_64
    


  • 这样做后,我可以成功运行 android.bat ,或从Eclipse菜单(但是仍然没有被运行的是<$ C的运行SDK管理器$ C> 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).

    这篇关于Android SDK中管理器将无法运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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