5

I'm unable to update Android SDK tools version 21.0.1 on my Windows machine. While installing, this log shows:

  Installing Android SDK Tools, revision 21.0.1
  Failed to rename directory E:\android-sdks\tools to E:\android-sdks\temp\ToolPackage.old01.
  [find_lock] Directory locked by cmd.exe;java.exe
  Done. Nothing was installed.

How can I update SDK to latest version?

Thanks.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
nijas
  • 1,879
  • 2
  • 15
  • 13
  • Looks like it is still running (the old version) while you try to update it. Windows doesn't like such things. Can you make sure it's not running anymore? I'd check e.g. with the Windows Taskmanager under "applications" as well as "processes". –  Jan 09 '13 at 07:38
  • Kill java.exe in your task manager :) – Liam W Jan 09 '13 at 08:18
  • Great! This worked!. Check http://stackoverflow.com/a/8559734/1917860 – nijas Jan 29 '13 at 07:16

5 Answers5

2

Android SDK Successfully updated. This one Works .. Check Here

nijas
  • 1,879
  • 2
  • 15
  • 13
1

i have gone through this. just follow steps. close eclipse(if open).

  • go to android-sdk folder
  • copy tools folder and paste in same location using tools-copy2 (or any thing)
  • just launch update from tools-copy2
  • and you will be able to update it.
Jitendra
  • 1,107
  • 2
  • 12
  • 22
0

Close the ADT, but leave the Android SDK Manager and click restart or replay

zerkos
  • 11
  • 2
0

I'm 99% sure that you're actually seeing a UAC problem. There are multiple known scenarios where Windows Vista or 7 (and presumably 8) will allow the creation of a new file, but silently blocks modification, and returns a "file locked" error message if you try.

Try temporarily disabling UAC (remember, you have to reboot for it to take effect) and running the updater with UAC disabled. If that fails, go a step further and make sure you launch the updater from a command prompt with Administrative privileges.

I think the root cause has something to do with the installer spawning another process/thread/app that doesn't inherit the parent's admin rights for some reason, and does it in a way/context that causes Windows to silently block the action instead of presenting you with a privilege elevation prompt.

Bitbang3r
  • 6,826
  • 5
  • 27
  • 40
0

I had problem updating android SDK platform tools. What I did is I ran the SDK manager as administrator and reloaded the packages. After that when I updated, it worked fine!