What to do if you can’t update your Android SDK Tools because “folder failed to be renamed or moved”

I got up bright and early this morning to update my Android SDKs (during HughesNet’s all-you-can-eat bandwidth time between 2am-7am). Much to my dismay, the Android Tools wouldn’t update from revision 15 to revision 17 because “a folder failed to be renamed or moved.” I have not had this problem updating in the past, so I was stumped.

The folder that failed to be moved ended up being the tools folder in the Android SDK directory. The problem was that SDK Manager.exe had launched tools\android.bat which uses a whole bunch of files in the tools folder. Of course Android can’t move that folder if the program (and it’s dependencies) doing the updating are in the folder to be moved!

Luckily the solution to this turned out to be really simple:

  1. Go the the android-sdk folder (wherever that may be on your system).
  2. Make a copy of the tools folder (my copy was called tools – Copy).
  3. Open the folder that is a copy (i.e. tools – Copy).
  4. Launch android.bat from that folder.
  5. The updater will launch and update whatever you tell it to.
  6. After the updates are finished, close the updater.
  7. You can then delete the tools – Copy folder and launch the SDK Manager like normal.
  8. Observe that everything updated.

Such a simple solution to a goofy predicament!

One Comment

Rizwan Sayani

Amazing. Found this to be really really helpful. So simple yet so necessary. Good job

Leave a Reply

Your email address will not be published. Required fields are marked *