Failed to rename directory tools to temp\ToolPackage.old01 in C:\android-sdk-windows

前端 未结 14 2603
日久生厌
日久生厌 2020-12-05 02:14

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 t

相关标签:
14条回答
  • 2020-12-05 03:08

    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.

    0 讨论(0)
  • 2020-12-05 03:12

    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:

    1. Delete the sdk\temp folder.
    2. Create a copy of the sdk\tools folder as sdk\copy
    3. Run android.bat which is inside the copy folder, from a command prompt, with admin privileges. This will start the SDK manager
    4. Update the sdk as you normally do when the SDK manager starts.
    5. Delete the sdk\copy folder
    0 讨论(0)
提交回复
热议问题