Android SDK 安装失败

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2010620/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 04:11:36  来源:igfitidea点击:

Android SDK fails to install

androidsdk

提问by Paul Breed

When I try to install the android SDK it fails to install.

当我尝试安装 android SDK 时,它无法安装。

My OS is Windows XP I just downloaded and installed Java JDK 1.6
Java -version from the command line returns: https://stackoverflow.com/questions/askjava version "1.6.0_17" Java(TM) SE Runtime Environment (build 1.6.0_17-b04) Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)

我的操作系统是 Windows XP 我刚刚下载并安装了 Java JDK 1.6
Java -version 从命令行返回:https: //stackoverflow.com/questions/ask java version "1.6.0_17" Java(TM) SE Runtime Environment (build 1.6 .0_17-b04) Java HotSpot(TM) 客户端 VM(构建 14.3-b01,混合模式,共享)

My environment vars have: JAVA_HOME=c:\progra~1\java\jdk1.6.0_11

我的环境变量有: JAVA_HOME=c:\progra~1\java\jdk1.6.0_11

I downloaded android-sdk-r04-windows.zip

我下载了 android-sdk-r04-windows.zip

I unziped it in V:\AndroidInstall\

我把它解压到 V:\AndroidInstall\

When I go to the

当我去

V:\androindinstall\android-sdk-windows> and type "SDK Install.exe" nothing happens... If I go this from graph

V:\androindinstall\android-sdk-windows> 并输入“SDK Install.exe”没有任何反应......如果我从图中去

When I do this from a graphical file viewer I get a quick flash that looks like a command line window and nothing....

当我从图形文件查看器执行此操作时,我会看到一个看起来像命令行窗口的快速闪烁,但什么也没有......

When I try to run android list targets

当我尝试运行 android 列表目标时

from the tool directory I get:

从工具目录我得到:

Error: Error parsing the sdk. Error: V:\androindinstall\android-sdk-windows\platforms is missing. Error: Unable to parse SDK content.

错误:解析 sdk 时出错。错误:V:\androindinstall\android-sdk-windows\platforms 丢失。错误:无法解析 SDK 内容。

So the basic install setup is not happening.

所以基本的安装设置没有发生。

Additional clues:

补充线索:

I have a G1 and Android 1.0 was running on this machine. (Almost a year ago)

我有一台 G1,这台机器上运行的是 Android 1.0。(大约一年前)

I've updated my G1 to 1.6 so I thought I'd update my SDK before starting new development.

我已将 G1 更新为 1.6,因此我想在开始新开发之前先更新我的 SDK。

When I tried to upgrade it tried and then died as the "directory was in use" So I cleaned out all the android directories, rebooted and redownloaded everythign from scratch. Now it won't run at all.

当我尝试升级它时,它尝试了然后死了,因为“目录正在使用”所以我清除了所有 android 目录,重新启动并从头开始重新下载所有内容。现在它根本不会运行。

I've clearly got something in an unhappy state, but I've cleaned up all the directories and no remanants seem to be running I've rebooted....

我显然有一些不愉快的状态,但我已经清理了所有目录并且似乎没有剩余的东西在运行我已经重新启动......

I've missed somethign I just can't figure out what.

我错过了一些我无法弄清楚的东西。

Paul

保罗

回答by Roman Shestakov

You should manually create 2 more directories under your root sdk dir 'android-sdk-windows':

您应该在根 sdk 目录“android-sdk-windows”下手动创建另外 2 个目录:

  1. platforms
  2. add-ons
  1. 平台
  2. 附加组件

and than start SDK Setup.exe from the root directory or try to open it from Eclipse 'Window' -> 'Android SDK and AVD manager'

然后从根目录启动 SDK Setup.exe 或尝试从 Eclipse 'Window' -> 'Android SDK and AVD manager' 打开它

回答by Damian

  1. Run the SDK setup
  2. Wait for the error message
  3. Disable anti virus
  4. Install this unlocker program http://download.cnet.com/Unlocker/3000-2248_4-10493998.html
  5. Run the unlocker program
  6. select the tools directory to unlock it
  7. select yes in the installer.
  1. 运行 SDK 设置
  2. 等待错误信息
  3. 禁用防病毒
  4. 安装这个解锁程序http://download.cnet.com/Unlocker/3000-2248_4-10493998.html
  5. 运行解锁程序
  6. 选择工具目录以将其解锁
  7. 在安装程序中选择是。

This is what worked for me.

这对我有用。

http://code.google.com/p/android/issues/detail?id=4410#c41

http://code.google.com/p/android/issues/detail?id=4410#c41

回答by RBI

I had the same problem, adding the directory add-ons got rid of the error when eclipse is first open but I still couldn't download packages from the sdk manager.

我遇到了同样的问题,添加目录加载项消除了首次打开 eclipse 时的错误,但我仍然无法从 sdk 管理器下载包。

What solved this problem for me (in windows 8) is running eclipse as administrator.

为我解决这个问题的方法(在 Windows 8 中)是以管理员身份运行 eclipse。

回答by Blundell

I got this error from my Jenkins CI.

我从我的 Jenkins CI 得到这个错误。

It was because the Jenkins user did not have permissions on the android-sdk-linuxfolder.

这是因为 Jenkins 用户没有该android-sdk-linux文件夹的权限。

(not the best solution but fixed it with):

(不是最好的解决方案,但修复了它):

 sudo chmod -R 777 /usr/bin/android-sdk-linux

回答by Jim

The directories "platforms" and "add-ons" need to be manually installed in the android SDK directory (parallel to "tool"). This is only necessary in a new installation.

目录“platforms”和“add-ons”需要手动安装在android SDK目录下(与“tool”平行)。这仅在新安装中是必需的。