无法更新\ tools-适用于Windows的Android SDK命令行工具 [英] Can't update \tools - Android SDK Command Line Tools for Windows

查看:414
本文介绍了无法更新\ tools-适用于Windows的Android SDK命令行工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚下载了适用于Windows的Android SDK命令行工具(26.0.2).我正在尝试使用\ tools \ bin \ sdkmanager.bat下载选定的SDK组件,以及更新\ tools.安装失败,并显示以下消息:

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:

警告:安装期间发生错误:无法移开或删除现有目标文件:C:\ testinstall \ sdk \ tools 手动将其移开,然后重试..

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..

我看不到如何手动删除\ tools,因为它包含\ bin \ sdkmanager.bat.

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

sdkmanager命令的屏幕截图:

Screenshot of the sdkmanager command:

所有其他组件似乎都已安装,没有错误.请参阅下面的包文件中指定的组件:

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

推荐答案

是的,这很有趣.一种方法是将tools文件夹复制到另一个位置(比如说C:\temp\).然后直接进入C:\temp\tools\bin\,在此处打开cmd提示符,并按如下方式运行更新命令:

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

sdkRootPath是原始SDK文件夹(C:\testinstall\sdk\)的路径.完成后,删除C:\temp\tools\复制的文件夹.

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

这篇关于无法更新\ tools-适用于Windows的Android SDK命令行工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆