I should update Android SDK Tools and Android SDK Platform-tools from Android SDK Manager. I accepted the licence terms and updating was started. But an error was occured and said me that;
The following processes:
cmd.exe
java.exe
are locking the following directory:
C:\Program Files\adt-bundle-windows-x86_64\sdk\tools
Please close these applications so that the installation can continue.
When ready, press YES to try again.
I opened the Task Manager and killed these processes. As you might guess, when i have killed these processes, Android SDK Manager closed. If you kill java.exe process, SDK Manager was also killed. This is a weird error description and not show you the right solution way. How can i update that Tools? Thanks in advance.
Follow these steps:
Close the sdk manager and eclipse.
Go to the folder where you have stored your adt.
In that adt folder you'll find a folder known as tools.
Make a copy of the contents of that folder and paste it in a folder called copytools.
Now go to the command prompt and go to the location of the copytools.
Then execute the command android.bat the sdk manager will start.
Now update all the plugins you want. It'll update your original folder.
After the update delete the copy.
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
Thanks it works
Related
When I try to open up the SDK Manager in eclipse it says opening shortly, but never opens. I've tried to open the exe file but it displays an error message saying:
Failed to execute tools\android:bat the system cannot find the file specified
My path environment variable leads it to the tools folder.
This is the path:
C:\Users\Shan\Documents\Computer Science - YEAR 2\Android App Development\adt-bundle-windows-x86-20130917\sdk\tools
In my case the Tools directory just disappear.
..\sdk\tools
To solve it:
1) Just go to SDK zip -> adt-bundle-windows-x86_64-20131030.zip
2) Unzip the Tools Directory only.
3) copy it under ../sdk/
I had a similar problem today. Press the Windows button and Search for android.bat(in the search programs and files text field)
Then copy the file to your android SDK folder (C:\Users\Shan\Documents\Computer Science - YEAR 2\Android App Development\adt-bundle-windows-x86-20130917\sdk\tools\).
After that don't run SDK manager but run the android.bat file.
Hope this helps
-Zaniar
I had to move the AVD manager from /sdk/tools/lib to the root folder /sdk
Copy the AVD Manager.exe and SDK Manager.exe from
SDK_ROOT_FOLDER/tools/lib/
into
SDK_ROOT_FOLDER
I've been working with this problem for three days and finally was able to run SDK Manager by
==> Running the android.bat file as administrator
Note: I did not have to make any changes to the .bat file (such as setting the java_exe path) in order for the manager to run.
I saw this as a comment on the top answer but can't upvote yet, so confirming it here!
I cancelled an update to Android Tools and it seems there's a bug with unzipping the old (or new?) version back into {android_sdk}/tools. The zip is located in {android_sdk}/temp. Just unzip it into the right location and it should work again.
If the accepted answer doesn't help anyone, it also might be a permission issue (if the SDK is installed in Program Files (x86), for example, so try running android.bat as Administrator,
I had the same issue when updating the Android SDK Tools and SDK Platform-tools from the SDK Manager. I had to replace the tools folder with one located in a zip folder inside the temp folder.
In My case, While I installed visual studio 2015, The SDK files were missed and I am getting an error window shown below.
So I manually downloaded the tools from the following URL.
tools_r24.0.2-windows
Then extract the zip file and copy the tools folder in the following location.
C:\Program Files (x86)\Android\android-sdk
It worked for me.
I think current Android SDK only works with JDK x86 version. I search so much but when installed JDK x86 version Android SDK manager worked without problem.
Copy your android.bat file to C:\adt-bundle-windows-x86_64-20140702\sdk\tools folder or copy all files to C:\.
If you are seeing this error, it may be an issue with your COMSPEC environment variable.
Please see https://stackoverflow.com/a/27284746/3866013 for more details.
I had the same problem. Caused it myself because while runing Android SDK Manager i hit UNINSTALL SDK Tools.
I fixed the issue by running the installation of the Android SDK again. The installation folder had to be the same as previously. After the installation, everything was back again as it was.
This is how I solved the problem on Windows 7:
I was going to update the SDK using Android SDK Manager but android.bat was not found because previously it uninstall the older one and then installs new. In my case my SDK Update was interrupted i.e. in other words, could not install after the SDK Manager uninstalled the tools, so my machine was not able to find android.bat. What I did was just downloaded the standalone SDK tools to the same folder where my SDK were from :
http://developer.android.com/sdk/index.html#Other
https://developer.android.com/sdk/index.html#Other
Here are two options for downloading the Android SDK for Windows users. One in recommended option and the other is .zip file. Zip file worked well.
Another option may also work. Try searching android.bat with windows search engine. If you find the one, copy it and paste in SDK tools folder.
open Sdk Manager.exe, then i deleted first Android Sdk tools, so, I also appeared such a mistake, then I downloaded installer_r24.3.2-windows.exe, installing, copy C:\Users\Super Man\AppData\Local\Android\android-sdk\tools folder to my Sdk path,run My Sdk Path\android.bat ,ok!!
I did the following :
I created a folder SDK right below my C-drive
I unzipped tools_r25.2.3-windows.zip to C:\SDK
I moved SDK Manager.exe from C:\SDK\tools\lib to C:\SDK
I first ran SDK Manager.exe in 'normal mode',but this gave me the error, but when I ran SDK Manager.exe as ADMINISTRATOR it didn't return the error.
The reg command exists but for unknown reason my path variable was corrupted during some installation.
So some basic element were missing:
C:\WINDOWS\system32;
C:\WINDOWS;
C:\WINDOWS\System32\Wbem
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.
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
It work for me after long search
Close the sdk manager and eclipse.
Go to the folder where you have stored your adt.
In that adt folder you'll find a folder known as tools.
Make a copy of the contents of that folder and paste it in a folder called copytools.
Now go to the command prompt and go to the location of the copytools.
Then execute the command android.bat the sdk manager will start.
Now update all the plugins you want. It'll update your original folder.
After the update delete the copy.
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\
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.
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
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..
I solved it in a very simple way, worked well for me.
close eclipse.exe
go to your directory containing android-sdks
run SDK Manager.exe
install required packages
close sdk Manager.exe
Start eclipse and you are almost there
update your ADT plugins by visiting Help menu in eclipse and then Check for Updates
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/
Steps to Resolve that
Close the Eclipse
2.Run the SDK Manager
3.Now update the packages
It works for me
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) :)
100 % working...
close eclipse.exe
go to your directory containing android-sdks
run SDK Manager.exe
install required packages
close sdk Manager.exe
Start eclipse and you are almost there
update your ADT plugins by visiting Help menu in eclipse and then Check for Updates
Restart your computer.
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.
I solved this using "unlocker" by emptyloop to unlock the directory without having to kill java.exe using the task manager.
I have installed android-sdk and configured my eclipse as per the instructions on the page http://developer.android.com/sdk/eclipse-adt.html#installing
However, as soon as the SDK Manager tries to update, it gets an error message regarding adb.exe in Platform-tools directory. I checked the android-sdk folder but couldd not find any such directory.
I am using Windows 7 (Home Basic), 64 bit, and am behind a proxy (netmon.iitb.ac.in)
Try run the Android SDK as Administrator (right click on it and choose Run as Admin) it should solve this issue. I think SDK trying to re-arrange folders as per new folder structure and it has no rights to do so inside programs folder.
else,
unninstall and install again.
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.
I have had this problem on Windows too. Instead of updating it through Eclipse, try the stand-alone option:
Close Eclipse
Open a Command Prompt window (ideally in
Administrator mode)
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.
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
I'm guessing that adb is restarting with the computer. Try adb kill-server before upgrading
Another simple fix:
Close Eclipse. Open the directory where your SDK is located (C:\Users\user35\android-sdks) and run SDK Manager (as Administrator).
First, I know this problem has been asked before, namely : Could not find adb.exe on my tools folder
but I tried every answer given and none work (even the accepted answer).
My problem is that I updated the Android SDK and now Eclipse cannot find adb.exe. I know where it is, it is in platform-tools directory, but I can't get Eclipse to read it from there. I updated the path.
Now what has happened is, in all my projects the asset folder is empty, meaning there is no android jar file.
Also, clicking on the SDK update manager from inside eclipse does nothing. I have no idea why.
Lastly, if I try to install new software in Eclipse (ADT update?) it wont allow it.
In the project -> preferences tab I get the following message:
Could not find C:\Program
Files\android-sdk-windows\tools\adb.exe!
I'm working on Windows 7 with Galileo eclipse.
Can anyone offer any help?
The adb tool has moved to platform-tools/
If you don't see this directory in your SDK, launch the SDK and AVD Manager (execute the android tool) and install "Android SDK Platform-tools"
I also faced the same problem before but now i solved the problem by following the step below
Step 1: You know where your android-sdk is installed in your system if you didnt changed the location search in ProgramFiles/Android
step 2: close eclipse.
Step 3: Copy adb.exe in android-sdk/platform-tools/ folder
Step 4: Paste that adb.exe in android-sdk/tools/ folder
Step 5: Now open eclipse go to Windows --> Preferences choose android then click browse and select android-sdk with in few minutes it shows APK levels installed in your system press Apply
Solution is simple. Unfortunately I forgot you need admin rights. That's why eclipse wouldn't install new packages. I simply opened Eclipse as the Admin and everything went smoothly. Lost all my R.java files for some reason, but got them back by cleaning the project(s).
I think that's because adb has moved to
C:\Program Files\android-sdk-windows\platform-tools\adb.exe
I 've tried this once.. when i got similar problem on Windows 7 .. Copy adb.exe from platform-tools to tools folder. Now eclipse should work properly.
Yes on tools/adb_has_moved you can read:
"The adb tool has moved to platform-tools/ If you don't see this directory in your SDK, launch the SDK and AVD Manager (execute the
android tool) and install "Android SDK Platform-tools" Please also
update your PATH environment variable to include the platform-tools/
directory, so you can execute adb from any location."
the adb tool has moved to platform-tools/ but in my case no adb was in this dir but in windows 7 you can make backup of this folder (just go in folder properties->Previous version) and save backup instead of original. In my case it helps
I got the same problem. In my case it was caused by an upgrade on the Java JDK. I was using 1.6 and upgraded to 1.7.
Just manually add the new JDK to Eclipse.
Right click on your project JRE System Library. Select installed JRE, and then find it on your computer.