且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法升级 Android SDK 工具

更新时间:2023-02-26 18:48:11

摘自这里:

说明:

  1. 制作 tools 目录的副本并将这个新目录命名为 tools2.
  2. 请勿使用SDK Setup.exe".
  3. 以管理员身份打开一个 cmd.exe 窗口并从这个新的 tools2 目录运行以下命令(显然是本地计算机上的完整路径会有所不同):J:android-sdk-windows>tools2android.bat 更新sdk

基本上,正如之前在此线程中所述,SDK Setup.exe"调用toolsandroid.bat,这使得它无法重命名之后的工具目录.这有点傻,不应该有通过了 QA 验证..

I'm trying to upgrade the Android SDK tools from revision 15 to revision 16. The update fails, claiming that a "folder failed to be moved":

Failed to rename directory C:android-sdk ools to C:android-sdk empToolPackage.old01

I tried disabling my antivirus (as this problem has been reported by some people in 2009), and it didn't work. A fresh reboot didn't work, either. I'm encountering this problem on two different Windows 7 machines.

I did not encounter this problem upgrading from previous revisions all the way up to revision 15.

Anybody knows how I can circumvent this?

Extracted from here:

INSTRUCTIONS:

  1. make a copy of the tools directory and call this new directory tools2.
  2. DO NOT USE 'SDK Setup.exe'.
  3. Instead open up a cmd.exe window as administrator and run the following from this new tools2 directory (obviously the full path on your local machine will be different): J:android-sdk-windows>tools2android.bat update sdk

Basically, as noted before in this thread, 'SDK Setup.exe' invokes toolsandroid.bat, which makes it impossible for it to rename the tools directory thereafter. It's a bit goofy and should never have passed QA validation..