Android SDK中管理器将无法运行

编程入门 行业动态 更新时间:2024-10-19 11:55:26
本文介绍了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 :

  • 安装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 sdk\tools\lib of the Android SDK.
  • Window -> Android SDK Manager menu in Eclipse
  • 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:

  • 卸载所有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 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菜单(但是仍然没有被运行的是 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中管理器将无法运行

    本文发布于:2023-11-27 08:20:33,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1637257.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:管理器   Android   SDK

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!