Wednesday, 1 October 2014

Error : Failed To Update Android SDK

Every Android update contains some tools and advance features . Today I need To update my Andorid SDK to include Google Glass Services in it and enable it to use Google Maps in Andorid Application . In android to use google maps you must have google glass services in your android sdk

Some times it may be possible you sdk not having google glass services . Generally google glass services are available under Extras folder in android sdk Check that folder and click on Install update

But when we update Android SDK we may have an error while updating android sdk . You may have following like error :-

Failed to rename directory 
C:\Media\adt-bundle-windows-x86_64-20130522\sdk\platforms\android-19 to 
C:\Media\adt-bundle-windows-x86_64-20130522\sdk\temp\PlatformPackage.old01.
[find_lock] Directory locked by javaw.exe
And then, a window appears with this message:

-=Warning!=-
The following processes:
- javaw.exe
are locking the following directory:
C:\Media\adt-bundle-windows-x86_64-20130522\sdk\platforms\android-19
Please close these aplications so that the installation can continue.

The main cause of these errors are while we are updating android sdk on one side and on other side our android tools are running or hold by some other background process and we cannot kill that process at it will be automatically started so don't try to do that so the solution to this problem is :-

Follow these simple steps: There are two possible solutions to this problem that may definately solve your problem these both worked for me

Solution1

1. Open your android sdk folder

2. Under that folder you will find temp folder if you are using android studio then path is: C:\Users\<username>\AppData\Local\Android\android-studio\sdk\temp
3. Cut everything and paste it in some other new folder
4. Rerun the sdk and now and update

Solution2

1. First Make a copy of the \tools folder, name it something like \copy. So you should have c:\android-sdk-windows\copy.
2. Now run android.bat from the \copy folder with Admin privileges.
3. This should prevent the issue with items currently being open in the \tools folder.
4. Now cheers..

Share this

0 Comment to "Error : Failed To Update Android SDK"

Post a Comment