Here is how my story goes. At first, I installed the Android SDK in the default directory it selected, which was Program File (x86) (which I thought the default was supposed to be app data?!) After SUCCESSFULLY pulling the APIs I quickly realized the mistake I had made, due to spaces being in the name, so I then uninstalled it and re-installed it in my D drive under a folder called development.
That all went fine, but when I tried to pull the SDK, I received the "A folder failed to be renamed or moved" message. I then tried disabling my anti-virus (more on that later), closing all other windows, and even ending windows explorer, but nothing changed.
To disable my antivirus, I used it's control panel (Avast BTW) to turn off the shields. What I really wanted to do was end the process, but, and here is the big but, Access Denied! I even ran taskmgr.exe as admin, but no success. Can anyone explain why that is? Anyways, after getting fed up with it all, I just booted into safemode with networking, and all is well for now, but I really would hate doing this every time I need to update the SDK, so any suggestions on how to fix this would be a great help, especially how to end my antivirus process so I can see if that's the problem.
EDIT: And I also did all that while running the Android SDK manager as administrator from the folder it is installed in.
I assume that the problem happens because the upgrade program wants to upgrade itself directly while it is running. My solution is that every time before you want to install something new, make a copy of
\<sdk dir>\tools dir in the
\<sdk dir>\ path, and then, upgrade or install something by excecuting android.bat in the
copied tools folder. This works for me.