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:
- Go the the android-sdk folder (wherever that may be on your system).
- Make a copy of the tools folder (my copy was called tools – Copy).
- Open the folder that is a copy (i.e. tools – Copy).
- Launch android.bat from that folder.
- The updater will launch and update whatever you tell it to.
- After the updates are finished, close the updater.
- You can then delete the tools – Copy folder and launch the SDK Manager like normal.
- Observe that everything updated.
Such a simple solution to a goofy predicament!