SDK Manager: Failed to install. SDK android platfo

2020-08-10 07:38发布

问题:

Failed to rename directory D:\android-sdk-windows\platforms\android-11 to D:\android-sdk-windows\temp\PlatformPackage.old01. Failed to rename directory D:\android-sdk-windows\platforms\android-11 to D:\android-sdk-windows\temp\PlatformPackage.old01. Failed to rename directory D:\android-sdk-windows\platforms\android-11 to D:\android-sdk-windows\temp\PlatformPackage.old01. Failed to rename directory D:\android-sdk-windows\platforms\android-11 to D:\android-sdk-windows\temp\PlatformPackage.old01. Failed to rename directory D:\android-sdk-windows\platforms\android-11 to D:\android-sdk-windows\temp\PlatformPackage.old01.

This is the message that I get when running the AndroidSDK manager when try to update the sdk manager.

SDK Manager: Failed to install A folder failed to be moved.. it suggests that something else is using the folder..like antivirus..but nothing does!!!

I cant update the SDK manager and add a component called: SDK android platform 3.0 API 11, revision 2.

How can i install that component

回答1:

I got that message once because I had an explorer window open to that directory. If it isn't antivirus, then try having the sdk manager as your only open window. If that fails, then open task manager and end every process that could be using it. If that fails, then something is probably wrong with your computer.



回答2:

On Windows 7, I got the same messages (I tried to do an SDK update by starting AVD manager within Eclipse). I think the root cause is needing Admin permissions for the SDK folder. So it might not be affecting folks who didn't allow the SDK to install under "Program Files...".

My fix was to run "SDK Manager.exe" as administrator.



回答3:

Here's the problem I ran into and how I fixed it:

  1. The program that is using that folder is Eclipse itself. So using the Android SDK manager and launching it from Eclipse creates an situation where the SDK Manager tries to update a folder that Eclipse is using. When you shut down Eclipse...you shut down the Android SDK manager. So you get stuck in an endless and silly situation.

To solve this:

  1. Close Eclipse and don't ever update the Android SDK from Eclipse again.
  2. Navigate to where your Android SDK is installed, and then launch it from there by double clicking: SDK Manager.exe
  3. Once you do this you can now download and install all updates needed without having Eclipse open.


回答4:

This was my exact situation, but closing everything I could didn't do the trick. I finally (d'oh) tried a re-install of the SDKs from the Android Dev site:

Android SDK - developer.android.com/sdk

... and it did the trick for me! It installed right away, started running the manager, and began updating the ones that previously wouldn't update!

Good luck!



回答5:

Not sure if anyone is still interested in this, but...

When I got this problem, I thought I surely had the solution when I realized that I had open projects which were accessing the Android version I was trying to update. After closing the projects, I got the same error again!?!

What I did to make it work was this:

1.In the command window, adb kill-server

2.Eclipse immediately starts trying to reconnect to adb. Note that Eclipse will restart adb shortly.

3.Before that restart occurs, do adb start-server in the command window. (Now, I think the process isn't owned by Eclipse and it will stop trying to restart adb.

4.Open the AVT Manager within Eclipse and do the update.

Buggy!



回答6:

Run Eclipse as Administrator, then start the SDK manager and update.



回答7:

If none of the above solutions work for you, then this might be the case of Terminal/shell prompts open navigating to Android-sdk folders. Close all those terminal windows and try again.



回答8:

I got the same error from the Eclipse IDE.

  1. Close the Android SDK Manager and Eclipse IDE.
  2. Run the Android SDK Manager as an Administrator.

You can do this by right clicking on the exe or menu shortcut and then select the Run As Administrator option.



回答9:

I have the same problem. my eclipse is closed, and I use lock explorer to see that the lock is actually held by the sdk manager itself. it seems the Android SDK manager is trying to update itself with Android SDK tools rev.19 This is fairly typical of google software.



回答10:

Core's answer is the best. Let me expand and say that the trick is to shut-down Exlipse and run SDK Manager.exe directly. You'll find it at the top level of your android-sdk-windows folder or wherever your android SDK lives. It seems that the rouge process that is not allowing the old SDK folder to be moved doesn't belong to a virus scanner but rather is one of Eclipse's own processes!



回答11:

I found that "Java.exe" is file that lock the SDK/Tools folder.by kill java.exe by process manager SDK manager automatically close.SDK manager neet to java.exe for execute but java.exe lock folder that SDK manager want to renamer it!!!