Skip to main content

Android: trouble updating to Android SDK Tools, revision 7



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?



Source: Tips4all

Comments

  1. 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:


    Copied tools\ to scrap\ within the SDK directory
    Ran android from the scrap\ directory
    Did the upgrade
    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.

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

    ReplyDelete
  3. In eclipse goto Window -> Android SDK and AVD manager and upgrade from there.
    Worked in my case.

    ReplyDelete
  4. 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.

    ReplyDelete
  5. This has worked for me:
    The SDKManager lock itself while reading the source.property file located at \tools\
    I've used the Process Explorer utility from Sysinternals as follows:
    1º execute Process Explorer
    2º Choose "Find File or DLL" and search for "property"
    3º Double-click on the file listed located at tools folder
    4º At the bottom window right-mouse on file and choose "Close handle"
    5º Try again to continue with the installation

    So long,
    Jose

    ReplyDelete
  6. 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 Manger.

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

    ReplyDelete
  7. 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.

    ReplyDelete
  8. The trouble is java.exe which is locking the \tools folder. However java.exe is started by running SDK Manager itself. However when using the scrap method described above (ie running android.bat from \scrap folder) java.exe is NOT locking \tools nor scrap .

    It just uses

    C:\Users\<USERNAME>\AppData\Local\Temp\temp-android-tool .

    ReplyDelete
  9. 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.

    ReplyDelete

Post a Comment

Popular posts from this blog

[韓日関係] 首相含む大幅な内閣改造の可能性…早ければ来月10日ごろ=韓国

div not scrolling properly with slimScroll plugin

I am using the slimScroll plugin for jQuery by Piotr Rochala Which is a great plugin for nice scrollbars on most browsers but I am stuck because I am using it for a chat box and whenever the user appends new text to the boxit does scroll using the .scrollTop() method however the plugin's scrollbar doesnt scroll with it and when the user wants to look though the chat history it will start scrolling from near the top. I have made a quick demo of my situation http://jsfiddle.net/DY9CT/2/ Does anyone know how to solve this problem?

Why does this javascript based printing cause Safari to refresh the page?

The page I am working on has a javascript function executed to print parts of the page. For some reason, printing in Safari, causes the window to somehow update. I say somehow, because it does not really refresh as in reload the page, but rather it starts the "rendering" of the page from start, i.e. scroll to top, flash animations start from 0, and so forth. The effect is reproduced by this fiddle: http://jsfiddle.net/fYmnB/ Clicking the print button and finishing or cancelling a print in Safari causes the screen to "go white" for a sec, which in my real website manifests itself as something "like" a reload. While running print button with, let's say, Firefox, just opens and closes the print dialogue without affecting the fiddle page in any way. Is there something with my way of calling the browsers print method that causes this, or how can it be explained - and preferably, avoided? P.S.: On my real site the same occurs with Chrome. In the ex