Reputation: 10662
When trying to upgrade Android SDK Tools to revision 16, I am getting the following error:
Failed to rename directory C:\android-sdk-windows\tools to C:\android-sdk-windows\temp\ToolPackage.old01.
Done. Nothing was installed.
Nothing I try to do, including providing FULL permissions (in addition to the special permissions it already had) to Administrator, helps.
Also, I don't know of anything that is accessing those directories.
How do I fix this problem?
Upvotes: 33
Views: 40951
Reputation: 394
Right click on "android-sdk" folder > properties > security > set full control permission for "ALL APPLICATION PACKAGES" and press OK, it take some minutes for sett this permission in all sub directories.
Upvotes: 0
Reputation: 33509
This is how I fixed it in Windows 7:
Make a copy of the \tools
folder, name it something like \copy
. So you should have c:\android-sdk-windows\copy
. Now run android.bat
from the \copy
folder with Admin privileges. This should prevent the issue with items currently being open in the \tools
folder.
Upvotes: 68
Reputation: 91
Had the same issue with that and even tried with the copied folder. I had to run adb kill-server
in the command prompt in the platform-tools
directory for it to continue.
Upvotes: 7
Reputation: 7703
For me this problem was solved by running SDK Manager with administrator privileges
Upvotes: 6
Reputation: 2400
i have another solution, that helped me. 1. When you got error message in SDK Manager, copy zip file (name contains version and 'tools' word) from sdk/temp folder; 2. Exit from SDK Manager; 3. Unzip archive from first item, you got new tools, and replace sdk/tools with new one; 4. Clean sdk/temp folder;
Upvotes: 0
Reputation: 1783
I ran into the same problem.
Most probably, you have a project opened in Eclipse (or android studio), and this project uses files that the SDK manager is trying to access or update.
So, the project is reading from some SDK platform folders/files, and the SDK manager is trying to overwrite it at the same time (for updating).
This is why you do not have permissions, not because you are not administrator.
Try closing Eclipse, click 'YES' in the SDK manager warning message (or re-run SDK manager again while Eclipse is not running).
Upvotes: 2
Reputation: 4009
For me, it worked by simply deleting the contents of the temp
directory in the SDK installation folder (C:\android-sdk-tools\temp
in your case)
Upvotes: 9
Reputation: 2265
For me who I tried all the previous solutions and didn't work I solved my problem with the following sugestion (#16) on the link: https://code.google.com/p/android/issues/detail?id=4410 which is:
Upvotes: 3
Reputation: 6032
For anyone who is having this issue on OS X, sudo chown -R $USER worked for me (on your android-sdk directory).
Upvotes: 1
Reputation: 551
In addition to the instructions given here by William, make sure you first delete the temp folder in the sdk folder. If it already exists, sometimes even creating a copy of the tools folder does not work. Therefore:
Upvotes: 0
Reputation: 934
You can run SDK Manager outside eclipse directly from the androidSDK directory.
Upvotes: 0
Reputation: 141
I encounter this problem while adding compatibility package to project in eclipse.
I solved this issue by opening the eclipse with administrator privileges.
In Windows 7:
Right click on eclipse.exe Run as administrator
.
To make eclipse.exe to run as administrator always
Right click on eclipse.exe --> Properties -->Compatibility tab
check the Run this program as an administrator
check box under Privilege Level
Upvotes: 2
Reputation: 1
Press ctrl + shift + esc to launch the task manager. Click on the Processes tab and sort the processes according to the command line column. Now search in the command line column for the same folder that contains /tools, click on it and click on End Process button. This will force all processes that use the same folder to be closed. Now open the SDK Manager again as administrator and it will work.
Upvotes: 0
Reputation:
I close the eclipse and run my android.bat (Path-To-YOUR-Android-SDK/tools/android.bat) from the command line.
It works for me
thanks
Upvotes: 1