Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't update \tools - Android SDK Command Line Tools for Windows

I have just downloaded the Android SDK Command Line tools for Windows (26.0.2). I am attempting to download selected SDK components using \tools\bin\sdkmanager.bat, as well as updating \tools. The installation fails with the following message:

Warning: An error occurred during installation: Failed to move away or delete existing target file: C:\testinstall\sdk\tools Move it away manually and try again..

I don't see how I can remove \tools manually because it contains \bin\sdkmanager.bat.

Screenshot of the sdkmanager command:

enter image description here

All other components appear to install without error. See below for the components specified in my package file:

enter image description here

like image 856
burntsugar Avatar asked May 05 '17 04:05

burntsugar


People also ask

How do I update Android SDK?

Open the Preferences window by clicking File > Settings (on Mac, Android Studio > Preferences). In the left panel, click Appearance & Behavior > System Settings > Updates. Be sure that Automatically check for updates is checked, then select a channel from the drop-down list (see figure 1). Click Apply or OK.

How install Android SDK tools on Windows?

In your browser on the PC, open the Android SDK download page and click Download the SDK Tools ADT Bundle for Windows. On the Get the Android SDK page, you can select either 32-bit or 64-bit, according to your Windows platform. This download includes the SDK tools and the Eclipse IDE.

How do I fix Android SDK is missing or corrupted?

Quick fix: Go to the Tools –> SDK manager –> SDK tools. Deselect Hide obsolete packages option on the right bottom and further install Android SDK Tools(obsolete). A new folder named Tools is now generated in the SDK directory.


1 Answers

Yeah that's quite funny. A way to do that is to copy the tools folder to another place (let's say C:\temp\). Then direct into the C:\temp\tools\bin\, open the cmd prompt there and run your update commands as such:

sdkmanager.bat --sdk_root=sdkRootPath --command 

Where sdkRootPath is path to your original SDK folder (C:\testinstall\sdk\). Once that is done, delete the C:\temp\tools\ copied folder.

like image 198
ahasbini Avatar answered Oct 02 '22 11:10

ahasbini