hunterp
hunterp

Reputation: 15986

Cannot upgrade Android SDK

I have closed every window, restarted the computer. But Eclipse is telling me: "C:\Program Files\android-sdk\tools is being accessed....I even deleted the directory but I still get : how to fix?

Failed to rename directory C:\Program Files\Android\android-sdk\platform-tools to C:\Program Files\Android\android-sdk\temp\PlatformToolPackage.old01.

Upvotes: 5

Views: 4367

Answers (4)

Mark Roberts
Mark Roberts

Reputation: 1044

I have had this problem on Windows too. Instead of updating it through Eclipse, try the stand-alone option:

  1. Close Eclipse
  2. Open a Command Prompt window (ideally in Administrator mode)
  3. Run the command "android"

If you have the SDK tools directory in your path it will open the same UI you get in Eclipse but without additional file locking. If it is not in your path have a look in C:\Program Files\Android\android-sdk\tools and run "android.bat" from there.

Also, once you have updated the SDK, don't forget to fire up Eclipse and, on the Help menu, click "Check for Updates". You may well find the ADK Eclipse plugin needs to be updated too - this often goes in step with SDK updates.

Upvotes: 14

Andre Ogle
Andre Ogle

Reputation: 172

Another simple fix:

Close Eclipse. Open the directory where your SDK is located (C:\Users\user35\android-sdks) and run SDK Manager (as Administrator).

Upvotes: 0

CommonsWare
CommonsWare

Reputation: 1007494

Supposedly, if you use the SDK Manager.exe program rather than tools\android.bat, it works. However, I've never had any luck with that.

My traditional approach has been:

  • Duplicate the tools\ directory to create a foo\ directory
  • Adjust your PATH and other environment variables to point to foo\
  • Run the tools\android.bat out of foo\
  • Do the upgrade, which should work
  • When done, close out of the SDK and AVD Manager, revert your PATH and such to point back to tools\, and get rid of the foo\ directory

Upvotes: 2

Earl
Earl

Reputation: 811

I'm guessing that adb is restarting with the computer. Try adb kill-server before upgrading

Upvotes: 0

Related Questions