Android SDK fails to install

微笑、不失礼 提交于 2019-12-07 13:48:34

问题


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

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/ask java 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)

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

I downloaded android-sdk-r04-windows.zip

I unziped it in 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

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

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.

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)

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

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.

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


回答1:


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

  1. platforms
  2. add-ons

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




回答2:


  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.

This is what worked for me.

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




回答3:


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.




回答4:


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.

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




回答5:


I got this error from my Jenkins CI.

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

(not the best solution but fixed it with):

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


来源:https://stackoverflow.com/questions/2010620/android-sdk-fails-to-install

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!