Android: trouble updating to Android SDK Tools, re

2019-01-21 23:07发布

Currently I have Android SDK 2.1 (+ tools revision 4). I'd like to upgrade to Android SDK 2.2. When I try to do it I'm informed I need to upgrade Android SDK Tools to revision 7 first. So I agree, the process starts and then I get an error:

-= warning! =- A folder failed to be renamed or moved. On Windows this typically means that a program Is using that Folder (for example Windows Explorer or your anti-virus software.) Please momentarily deactivate your anti-virus software. Please also close any running programs that may be accessing the directory 'D:\Install\Programming\android-sdk-working-dir\android-sdk_r04-windows\android-sdk-windows\too!s'. When ready, press YES to try again.

Downloading Android SDK Tools, revision 7 Installing Android SDK Tools, revision 7

Failed to rename directory D:\Install\Programming\android-sdk-working-dir\android-sdk_r04-windows\android-sdk-windows\tools to D:\Install\Programming\android-sdk-working-dir\android-sdk_r04-windows\android-sdk-windows\temp\ToolPackage.old01.

I am aware of http/https and antivirus issues. So I disactivated my AV. I also closed any application that might hold a handle to the folder. Eclipse is also closed (I start the manager via command line). However I still get the same error.

Looks like the only app that can hold a handle to the folder is the manager itself, because its starting directory is the one the error complains about ('\tools').

I am on Win XP Pro + SP3. I run as admin.

Does anyone have an idea?

19条回答
2楼-- · 2019-01-21 23:26

The folder is locked by the packages under the repository. For each package under the repository, change the android version, restart the eclipse and then run the update again. The error message should not be appear.

查看更多
小情绪 Triste *
3楼-- · 2019-01-21 23:27

I faced this very same problem a lot of times (unable to move platform-tools folder). I tried everything copying tools to a 'scrap' folder and running the android.bat and turning off anti-virus and explorer that might possibly be suing the tools folder. None of thse worked unfortunately.I came across a solution in some forum which worked for me.

1. Find the "temp" folder and you can find the "tools_r05-windows.zip" or other files which you will update. 2. unzip it. 3. here you will find the "tools_r05-windows" and copy all the files in the file. which should be updated file. 4. copy to the "tools" folder.

This is a manual update of the platform tools and later you can update the SDK version to the latest as well..

查看更多
Emotional °昔
4楼-- · 2019-01-21 23:29

Unable to upgrade tools with the program running. Close the SDK. Replace the folder tools for the contents of the zip file into the temp folder manually.

查看更多
男人必须洒脱
5楼-- · 2019-01-21 23:33

Make sure you run SDK Manager as an administrator (Right-click and choose run as administrator). If running it from the command line, start the command line as an administrator.

查看更多
【Aperson】
6楼-- · 2019-01-21 23:33

Just install this

http://download.cnet.com/Unlocker/3000-2248_4-10493998.html

and kill the proccess that use the folder

查看更多
闹够了就滚
7楼-- · 2019-01-21 23:33

I tried all the various suggestions short of uninstalling and reinstalling the whole sdk and still got the error, including disabling thumbnails, which is the most common suggestion for folders you can't rename. I downloaded the free "processexplorer" from Microsoft to see what processes were using the folder, and after disabling all startup and non-Microsoft processes and finding no processes to be using the platform-tools folder, I still got the error, and found I couldn't rename it after the upgrade attempt.

The solution for me was to copy and paste the platform-tools folder found in the 'temp' folder in the android-sdk folder. Every upgrade I find a copy of the platform-tools in there, although for version 19 the platform-tools was zipped and the temp folder included versions of 18 and 17 which I left.

查看更多
登录 后发表回答