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:19

I had this issue and I tried every above solution but those were didn't work.

Then I downloaded the android SDK and reinstalled it, soon after I managed to get update all Android API tools by opening up the android SDK Manager.

By the way Android.4 seems awesome, the best mobile OS I have ever had.

查看更多
我命由我不由天
3楼-- · 2019-01-21 23:19

Building off Lucas's answer:

I kept running into a Destination Folder Access Denied in trying to update/replace /tools/lib/ files. Here was my fix:

You can delete the /tools/ folder then manually add it again and manually move items from the latest /temp/ zip version to your /tools/ folder.

查看更多
成全新的幸福
4楼-- · 2019-01-21 23:20

Running the avd manager by itself (without starting eclipse) worked for me.

查看更多
孤傲高冷的网名
5楼-- · 2019-01-21 23:22

I think they fixed this problem in the later version of the tools, but I ran into this a while back. Here's what I did:

  1. Copied tools\ to scrap\ within the SDK directory
  2. Ran android from the scrap\ directory
  3. Did the upgrade
  4. Deleted the scrap\ directory when done

I might have had to also change environment variables (e.g., PATH) that had been pointing to tools\ to point to scrap\ during this process -- I'm a bit fuzzy on the details.

查看更多
The star\"
6楼-- · 2019-01-21 23:22

What worked for me is updating from a new workspace with no projects, setting the Android SDK location to the same as the previous workspace, and updating from there. I think the projects are holding on the folder.

Tried the admin fix but that didn't work for me. Also I'm already updating from the Android SDK and AVD manager so that's not the solution. And killing the adb.exe just gave me a lot of errors. I kept getting the folder error, even after rebooting.

查看更多
走好不送
7楼-- · 2019-01-21 23:26

Try just kill adb.exe process. It worked. for me.

查看更多
登录 后发表回答