“ SDK平台工具组件丢失!”


69

我正在尝试通过此线程将添加的SDK Platform 1.6添加到现有的Install 2.2中。

如建议的那样,我运行HelpCheck for Updates,它找到并安装了以下内容:

  + Android DDMS              8.0.1.v201012062107-82219
  + Android Development Tools 8.0.1.v201012062107-82219

It prompted for restarting Eclipse and when it restarted it gave me the following error message:

"SDK Platform Tools component is missing!
Please use the SDK Manager to install it."

Huh? Why? I still have the SDK Platform Tools on C:\android-sdk-windows that was working perfectly before I did this "upgrade".

What do I need to have both 2.2 and 1.6 supported in my development environment?


mmm.. I updated ADT some time ago now, I'm not sure... but maybe you need to specify again the SDK location in preferences->android?
bigstones

@Bigstones thanks for your answer. I verified that the SDK location in preferences->android is the same as what currently installed. That didn't help. Perhaps I need to install 2.3 SDK tools, too?
Android Eve

Answers:


86

OK, here is what I did to fix the problem:

Open Eclipse. Then:
  Window > Android SDK and AVD Manager
   > Available Packages: 
     > Android Repository:
       + Android SDK Tools, revision 8
       + Android SDK Platform-tools, revision 1

[Install Selected]

I got some errors trying to download the files, /usr/local/android saying permission denied. Didn't have time to figure out which user was trying to write there, so chmod a+w was my crappy hack...
JJ Geewax

I love stackoverflow. This simple step is missing in the android plugin docs
npiv

1
Great job on answering your own question!
Kerry Jones

I had to set the Proxy Server in Android SDK Manager from Tools > Options like @persons08 said.
Khalid Saifullah

40

The downloaded sdk software does not contain sdk platform tools.

For this, using cmd go to "C:\Program Files\Android\android-sdk\tools" directory and then type the following command to download those missing tools:

android.bat update sdk --no-ui 

Then type y to accept all the licenses in cmd. Downloading will start in cmd itself.


1
THANK YOU VERY MUCH FOR YOUR CORRECT ANSWER. I really didn't want to waste time downloading ~300MB of useless IDE to get hold of ADB. Poor planning on Google's part, IMHO.
Xyon

2
Worked perfectly! For those on a mac remove the .bat and just use "android update sdk --no-ui"
Dave

@Udit Sood Can this be done in that it only downloads and installs platform-tools (ADB) instead of all the APIs as well?
user1795832

5

Installing Android SDKs is done via the "Android SDK and AVD Manager"... there's a shortcut on Eclipse's "Window" menu, or you can run the .exe from the root of your existing Android SDK installation.

Yes I think installing the 2.3 SDK will fix your problem... you can install older SDKs at the same time. The important thing is that the structure of the SDK changed in 2.3 with some tools (such as ADB) moving from sdkroot\tools to sdkroot\platform-tools. Quite possibly the very latest ADT plugin isn't massively backwards-compatible re that change.


thanks for your answer and +1. I noticed it only after I posted my solution. BTW, calling it the 2.3 SDK is very confusing for me. I deliberately didn't install "DK Platform Android 2.3" as I want to see whether the new SDK tools and "platform-tools" will work with 2.2 and 1.6.
Android Eve

3

I don't understand why the files were relocated to /platform-tools from /tools. It seems ALL development tools I have tried, appcelerator for one, have their setup software look for these files in /tools and fail setup. The "work around" involves a few different bits of trickery wherein you either...1) set up a soft link to tell the operating system "if you look for file "x" here it is really over here. or 2) simpler method ... make a copy of all the /platform-tools default (pre-additional android sdk installations) files and place them into the /tools folder. this circumvents the relocation that the newer sdk have done. Then of course YOU MUST SET PATH ENVIRONMENT VARIABLES TO POINT TO THE SDK LOCATION (sometimes to the Android-sdk-[operating system name:Android-sdk-windows or Android-sdk-mac_x86 ect. ] and to the /platform-tools and sometimes to /tools. it is a trial and error pain. But when it finally is working ...it works.


2

Before update SDK components, check in Android SDK ManagerToolsOptions and set HTTP proxy and port if it is set in local LAN.


1

The latest version of the Android SDK ships with two different applications: an SDK Manager and an AVD Manager rather than one single app that was valid when this question was originally asked.

My particular problem was unrelated to the other suggestions. I'm on a network at the moment where HTTPS traffic is mostly disallowed. In order to install the Android Platform Tools I needed to turn on the option to "Force https://... sources to be fetched using http://..." and then this allowed me to install the other tools.



0

I have been faced with a similar problem with SDK 24.0.2, and ADT 23.0, on windows 7 and Eclipse Luna (4.4.0). The android SDK Manager comes with default Proxy IP of 127.0.0.1 (localhost) and port 8081. So as you try to run the SDK Managers as advised by earlier solutions, it will try to connect through the default proxy settings, which keep on failing(...at least on my system). Therefore, if you do not need proxy settings, simply clear default proxy settings (i.e. remove proxy server IP and Port, leaving the fields empty). Otherwise set them as necessary. To access these settings in eclipse, go Window-> Android SDK Manager->Tools->Options.

Hope this helps someone.


0

step 1: click on the blue icon on taskbar. It is "SDK MANAGER". Then next click on the Appearance & Behaviour -> System Settings -> Android Sdk

step2: select on "Android SDK location" and choose edit option.It will prompt you update/install the components. Then start the download or update and this may take a while , all you have to do is wait patiently. "In case you have previously installed the sdk it will show that the sdk android sdk is installed"

step3: once this is done the program will compile fine ,and no error will exist whatsoever.


0

Thanks Udit Sood

android.bat update sdk --no-ui not worked on windows 10 powershell but .\android.bat update sdk --no-ui worked

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.