Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SDK Manager failed to install 'java.exe' locking directory

I have ran into a curious error when trying to update Android SDK Tools to revision 21 from revision 20.0.3. The ADT plug-in updated properly so now I am at a stand still until resolved.

The initial error I got listed cmd.exe & java.exe as locking the directory, I forced closed cmd.exe and got this:

If I force close java.exe then obviously my SDK Manager closes.

SDK Manager Log:

This is my work computer so I'd really like to avoid any down-time resulting from a reboot, just curious if anyone has come across this issue and been able to resolve.

I have tried closing Eclispe and running SDK Manager from the file directory, same issue, I read that someone had experienced this while having the directory opened so I closed and still, same issue. Any help is appreciated.


Eclipse:
Version: 3.7.2
Build id: M20120208-0800


Update:

Fresh reboot did NOT resolve.

like image 535
jnthnjns Avatar asked Nov 27 '12 15:11

jnthnjns


People also ask

How do I download SDK Manager EXE?

Download the latest "command line tools only" package from the Android Studio downloads page and unzip the package. Move the unzipped cmdline-tools directory into a new directory of your choice, such as android_sdk . This new directory is your Android SDK directory.

How do I install missing components in SDK manager?

Step 1: In Android Studio go to Tools > SDK Manager. Step 2: Go to the SDK Tools tab as shown in the below image. Step 3: Select the Android SDK Command-line Tools (latest) and download by pressing Apply.

Can I delete Android SDK folder?

After deleting all these folders, go to C:\Program Files and delete the Android folder. We have deleted all the Android Studio files now to delete any remains of SDK, go to %LOCALAPPDATA% and delete the Android folder.


2 Answers

I resolved this by copying my \tools folder, naming the copy \toolsCopy. Then I ran android.bat from the \toolsCopy folder with Administrator privileges.

Running the SDK manager from \tools locked the renaming of the \tools directory, for obvious reasons. SMH

like image 161
jnthnjns Avatar answered Sep 23 '22 18:09

jnthnjns


It work for me after long search

  1. Close the sdk manager and eclipse.

  2. Go to the folder where you have stored your adt.

  3. In that adt folder you'll find a folder known as tools.

  4. Make a copy of the contents of that folder and paste it in a folder called copytools.

  5. Now go to the command prompt and go to the location of the copytools.

  6. Then execute the command android.bat the sdk manager will start.

  7. Now update all the plugins you want. It'll update your original folder.

  8. After the update delete the copy.

like image 21
Pravin Bhosale Avatar answered Sep 19 '22 18:09

Pravin Bhosale