[英]Failed to rename directory tools to temp\ToolPackage.old01 in C:\android-sdk-windows
When trying to upgrade Android SDK Tools to revision 16, I am getting the following error: 尝试将Android SDK工具升级到版本16时,出现以下错误:
Failed to rename directory C:\\android-sdk-windows\\tools to C:\\android-sdk-windows\\temp\\ToolPackage.old01.
无法将目录C:\\ android-sdk-windows \\ tools重命名为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. 我没有尝试做任何事情,包括向管理员提供FULL权限(除了已经拥有的特殊权限)无济于事。
Also, I don't know of anything that is accessing those directories. 另外,我不知道正在访问这些目录的任何内容。
How do I fix this problem? 我该如何解决这个问题?
This is how I fixed it in Windows 7: 这是我在Windows 7中修复它的方式:
Make a copy of the \\tools
folder, name it something like \\copy
. 制作
\\tools
文件夹的副本,将其命名为\\copy
。 So you should have c:\\android-sdk-windows\\copy
. 因此,您应该拥有
c:\\android-sdk-windows\\copy
。 Now run android.bat
from the \\copy
folder with Admin privileges. 现在,以管理员权限从
\\copy
文件夹运行android.bat
。 This should prevent the issue with items currently being open in the \\tools
folder. 这样可以防止
\\tools
文件夹中当前打开的项目出现问题。
对我来说,它只需删除SDK安装文件夹中temp
目录的内容即可(在您的情况下为C:\\android-sdk-tools\\temp
)
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. 我必须在
platform-tools
目录的命令提示符下运行adb kill-server
才能继续。
对我来说,这个问题是通过使用管理员权限运行SDK Manager来解决的
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: 对于尝试了所有先前解决方案但无法正常工作的我,我通过以下链接(#16)解决了我的问题: https : //code.google.com/p/android/issues/detail? id = 4410是:
I encounter this problem while adding compatibility package to project in eclipse. 在向Eclipse中的项目添加兼容性包时遇到了这个问题。
I solved this issue by opening the eclipse with administrator privileges. 我通过使用管理员权限打开Eclipse解决了这个问题。
In Windows 7: Right click on eclipse.exe Run as administrator
. 在Windows 7中:右键单击eclipse.exe
Run as administrator
。
To make eclipse.exe to run as administrator always 使eclipse.exe始终以管理员身份运行
Right click on eclipse.exe --> Properties -->Compatibility tab
check the Run this program as an administrator
check box under Privilege Level 右键单击
eclipse.exe --> Properties -->Compatibility tab
选中Run this program as an administrator
特权级别”下的“ Run this program as an administrator
复选框
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. 最有可能的是,您有一个在Eclipse(或android studio)中打开的项目,并且该项目使用SDK管理器试图访问或更新的文件。
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). 因此,该项目正在读取一些SDK平台的文件夹/文件,而SDK管理器正试图同时覆盖它(以进行更新)。
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). 尝试关闭Eclipse,在SDK管理器警告消息中单击“是”(或在Eclipse不运行时再次重新运行SDK管理器)。
I close the eclipse and run my android.bat (Path-To-YOUR-Android-SDK/tools/android.bat) from the command line. 我关闭月食并从命令行运行android.bat(Path-To-YOUR-Android-SDK / tools / android.bat)。
It works for me 这个对我有用
thanks 谢谢
对于在OS X上遇到此问题的任何人,sudo chown -R $ USER为我工作(在您的android-sdk目录中)。
Press ctrl + shift + esc to launch the task manager . 按ctrl + shift + esc启动任务管理器 。 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.
现在,在命令行列中搜索包含/ tools的文件夹,单击该文件夹,然后单击“ 结束进程”按钮。 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.
现在,以管理员身份再次打开SDK Manager ,它将起作用。
您可以直接从androidSDK目录在eclipse外部运行SDK Manager。
In addition to the instructions given here by William, make sure you first delete the temp folder in the sdk folder. 除了William在此处给出的说明之外,请确保首先删除sdk文件夹中的temp文件夹。 If it already exists, sometimes even creating a copy of the tools folder does not work.
如果已经存在,有时甚至无法创建tools文件夹的副本。 Therefore:
因此:
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;
1.当您在SDK Manager中收到错误消息时,请从sdk / temp文件夹复制zip文件(名称包含版本和“工具”字样); 2. Exit from SDK Manager;
2.退出SDK Manager; 3. Unzip archive from first item, you got new tools, and replace sdk/tools with new one;
3.从第一项解压缩存档,您获得了新工具,并用新工具替换了sdk / tools; 4. Clean sdk/temp folder;
4.清理sdk / temp文件夹;
右键单击“ android-sdk”文件夹>属性>安全性>为“所有应用程序包”设置完全控制权限,然后按确定,这将花费几分钟的时间在所有子目录中设置此权限。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.