简体   繁体   English

无法在C:\\ android-sdk-windows中将目录工具重命名为temp \\ ToolPackage.old01

[英]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是:

  1. Find the "temp" folder and you can find the "tools_r05-windows.zip" or other files which you will update. 找到“ temp”文件夹,然后可以找到“ tools_r05-windows.zip”或其他要更新的文件。
  2. unzip it. 解压缩。
  3. here you will find the "tools_r05-windows" and copy all the files in the file. 在这里,您将找到“ tools_r05-windows”并复制文件中的所有文件。 which should be updated file 应该更新的文件
  4. copy to the "tools" folder. 复制到“工具”文件夹。
  5. OK. 好。

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: 因此:

  1. Delete the sdk\\temp folder. 删除sdk \\ temp文件夹。
  2. Create a copy of the sdk\\tools folder as sdk\\copy 创建sdk \\ tools文件夹的副本为sdk \\ copy
  3. Run android.bat which is inside the copy folder, from a command prompt, with admin privileges. 使用管理员权限从命令提示符运行副本文件夹内的android.bat。 This will start the SDK manager 这将启动SDK管理器
  4. Update the sdk as you normally do when the SDK manager starts. SDK管理器启动时,像平常一样更新sdk。
  5. Delete the sdk\\copy folder 删除sdk \\ copy文件夹

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.

相关问题 Eclipse问题。 验证C:\\ android-sdk-windows \\ tools \\ lib \\ devices.xml时出错 - Eclipse problem. Error validating C:\android-sdk-windows\tools\lib\devices.xml 如何使用android-sdk-windows \\ extras \\ android \\ compatibility \\ v4的示例 - how to use the sample of android-sdk-windows\extras\android\compatibility\v4 Ionic App Android SDK问题-无法创建目录/usr/local/Cellar/android-sdk/23.0.2/temp - Ionic App Android SDK Issue - Failed to create directory /usr/local/Cellar/android-sdk/23.0.2/temp Android Studio:更新SDK或SDK工具失败 - Android Studio: Failed to update SDK or SDK Tools 如何更改android`sdk`的`temp`目录路径? - How to change the `temp` directory path of android `sdk`? 安装失败; 程序访问目录 android-sdk\platform-tools - Failed to Install; Program accessing directory android-sdk\platform-tools Android studio-“缺少 SDK 工具目录” - Android studio- "SDK tools directory is missing" android SDK 工具26.1.1和模拟器安装失败 - Failed to install android SDK tools 26.1.1 and Emulator 如何在新的Android SDK工具中更新旧的Android项目以获取更新? - How to update old Android project for the updates in new Android SDK tools? 无法更新 \\tools - 适用于 Windows 的 Android SDK 命令行工具 - Can't update \tools - Android SDK Command Line Tools for Windows
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM