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

回眸只為那壹抹淺笑 提交于 2019-11-30 06:32:51

问题


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.


回答1:


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




回答2:


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.




回答3:


I got mine working by going into the android-sdk\temp folder and extracting the tools_r22.3-windows.zip and renaming the current tools folder to tools123 and moved the extracted tools folder to \android-sdk\




回答4:


  • Close command line & explorer (whatever is blocking java.exe)
  • Cut all files & folders from temp folder (android-sdk\temp)
  • Paste it to some other folder say (temp_old)
  • Run cmd.exe (Run as administrator) and start the process again.
  • If still it doesn't work, manually copy tools directory to temp folder & check.



回答5:


IF USING ANDROID BUNDLE

close the SDK manager and eclipse. From the SDK folder in bundle goto tools. Copy all files of the tools folder to another folder named toolscopy. Now in cmd navigate to SDK folder then to toolscopy and execute "android.bat". Now the SDK manager will execute and you can update all your updates. you can delete the toolscopy folder as the tools folder will automatically get updatesd :D




回答6:


Close eclipse and try again it will work.. (After closing eclipse Android SDK Manager window will not close)

or,

Just go to task manager and end the eclipse process and try again it will work..




回答7:


I solved it in a very simple way, worked well for me.

  1. close eclipse.exe
  2. go to your directory containing android-sdks
  3. run SDK Manager.exe
  4. install required packages
  5. close sdk Manager.exe
  6. Start eclipse and you are almost there
  7. update your ADT plugins by visiting Help menu in eclipse and then Check for Updates
  8. in case if it doesn't (which it didn't in my case remove the old versions of plugins manually) work and install them again from https://dl-ssl.google.com/android/eclipse/



回答8:


Steps to Resolve that

  1. Close the Eclipse

2.Run the SDK Manager

3.Now update the packages

It works for me




回答9:


I got the same problem. Then go to temp folder extract "tools_r24.0.2-windows.zip" copy "tools" folder from extracted folder and then paste it inside "sdk" folder.(or override on tools folder) :)




回答10:


100 % working...

  1. close eclipse.exe
  2. go to your directory containing android-sdks
  3. run SDK Manager.exe
  4. install required packages
  5. close sdk Manager.exe
  6. Start eclipse and you are almost there
  7. update your ADT plugins by visiting Help menu in eclipse and then Check for Updates
  8. Restart your computer.



回答11:


If you install SDK with eclipse in execution this error will go occur. For you resolve this problem, you should have stop the eclipse application.




回答12:


I solved this using "unlocker" by emptyloop to unlock the directory without having to kill java.exe using the task manager.



来源:https://stackoverflow.com/questions/13587478/sdk-manager-failed-to-install-java-exe-locking-directory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!