简体   繁体   English

使用SDK Manager更新SDK时收到错误

[英]Error received when updating the SDK with the SDK Manager

I'm completely frustrated with the Android SDK Manager. 我对Android SDK Manager感到非常沮丧。

I'm running Win 7 Home edition and have the SDK installed in its own top level directory on my D:\\ drive. 我正在运行Win 7 Home Edition并将SDK安装在我的D:\\驱动器上的顶级目录中。

When I run SDK Setup.exe from the command line (and I've even opened the prompt as an administrator), I get an error when trying to update the packages. 当我从命令行运行SDK Setup.exe(我甚至以管理员身份打开提示)时,在尝试更新软件包时出错。

The SDK manager is telling me that I need to install the SDK Tools rev 7. But when I accept the license, I get an error message stating: SDK管理器告诉我需要安装SDK Tools rev 7.但是当我接受许可证时,我收到一条错误消息,指出:

"A folder failed to be renamed or removed" yada yada yada. “文件夹无法重命名或删除”yada yada yada。 The Installing Archives window says "Failed to rename directory D:\\android-sdk-windows\\tools to D:\\android-sdk-windows\\temp\\ToolPackage.old01." 安装档案窗口显示“无法将目录D:\\ android-sdk-windows \\ tools重命名为D:\\ android-sdk-windows \\ temp \\ ToolPackage.old01”。

I looked here for help: 我在这里寻求帮助:

http://groups.google.com/group/android-developers/browse_thread/thread/4b784f3eb1e096fd/ecadfb28ce5daf5f?lnk=gst&q=cannot+rename+folder#ecadfb28ce5daf5f http://groups.google.com/group/android-developers/browse_thread/thread/4b784f3eb1e096fd/ecadfb28ce5daf5f?lnk=gst&q=cannot+rename+folder#ecadfb28ce5daf5f

but the content there didn't help. 但那里的内容没有帮助。

  1. I DO have my antivirus (AVG) disabled. 我禁用了我的防病毒软件(AVG)。

  2. I DO NOT have any other programs running -- just the command prompt to launch the SDK Manager. 我没有运行任何其他程序 - 只是命令提示符启动SDK管理器。

  3. I have even given the everyone group, for the D:\\android-sdk-windows\\ folder, full control. 我甚至给了每个人组,对于D:\\ android-sdk-windows \\文件夹,完全控制。

  4. I tried to rename the tools directory before starting the SDK Manager but then I get an error that a batch file cannot be found when I try to launch SDK Setup.exe. 我尝试在启动SDK Manager之前重命名tools目录,但是当我尝试启动SDK Setup.exe时出现错误,导致无法找到批处理文件。 Grrrr. GRRRR。

None of this works. 这些都不起作用。

Suggestions how to get the package to update without error are greatly appreciated. 建议如何让包更新而不出错,非常感谢。

Thanks! 谢谢!

A simple thing, 一件简单的事,

There will be zipped file after this error has been occured. 发生此错误后将出现压缩文件。 Meaning that Updated tools got store as tools_r16-windows.zip in C:\\Program Files\\Android\\android-sdk\\temp 意味着更新的工具在C:\\ Program Files \\ Android \\ android-sdk \\ temp中存储为tools_r16-windows.zip

Just extract it and copy it in our tools folder C:\\Program Files\\Android\\android-sdk\\tools 只需解压缩并将其复制到我们的工具文件夹C:\\ Program Files \\ Android \\ android-sdk \\ tools中

Enjoy:) I think ths might help. 享受:)我认为这可能有所帮助。 Please give your comments!! 请发表您的意见!

If you get this error while using Eclipse on a 64-bit Window 7 (might 32-bit as well), exit Eclipse, go to your SDK folder and run "SDK Manager.exe" as Administrator. 如果在64位Window 7(也可能是32位)上使用Eclipse时出现此错误,请退出Eclipse,转到SDK文件夹并以管理员身份运行“SDK Manager.exe”。 In my case, Eclipse turned out to be what locked the folder in the first place. 就我而言,Eclipse最终成为锁定文件夹的原因。

@ Stratos - Thank you for your instructions, they worked for me. @ Stratos - 谢谢你的指示,他们为我工作。

  1. Go to Android\\ android-sdk\\ tools\\ 转到Android \\ android-sdk \\ tools \\
  2. Delete "source.properties" (Right click - delete) 删除“source.properties”(右键单击 - 删除)
  3. Open SDK Manager and update 打开SDK Manager并进行更新

And everyone lived happily ever after... 每个人都过着快乐的生活......

You can't use 64 bit java or 64 bit eclipse. 你不能使用64位java或64位eclipse。 That's almost certainly your problem. 这几乎肯定是你的问题。

以管理员身份运行SDK管理器,这对我来说很有用

Had the same problem. 有同样的问题。 For me it was a bit circular, the SDK manager had a hold at source.properties and closing the process terminated the update. 对我而言,它有点循环,SDK管理器在source.properties处保留并关闭该进程终止了更新。 I deleted android-sdk\\tools\\source.properties before running the SDK manager and it all worked. 我在运行SDK管理器之前删除了android-sdk \\ tools \\ source.properties,这一切都奏效了。 Oh and I was not updating through Eclipse so it is not an Eclipse problem. 哦,我没有通过Eclipse更新,因此它不是Eclipse问题。

I can't vote yet, or I would have voted for Stratos. 我还不能投票,否则我会投票给Stratos。

I had already disabled my Norton antivirus (after reading other posts). 我已经禁用了我的诺顿防病毒软件(阅读其他帖子后)。 Removing the source.properties file helped. 删除source.properties文件有帮助。

Don't forget to run SDK manager with admin rights if not already. 如果不是,请不要忘记运行具有管理员权限的SDK管理器。

There is another simple way: 还有另一种简单的方法:

When the SDK asks to install the Java SE JDK press back and then press next. 当SDK要求安装Java SE JDK时,请按返回,然后按next。 This time it will detect the installed JDK. 这次它将检测已安装的JDK。 I solved this problem twice with this method 我用这种方法解决了这个问题两次

Use Unlocker to unlock the tools folder. 使用Unlocker解锁工具文件夹。

Right click on tools folder -> Unlocker. 右键单击tools文件夹 - > Unlocker。 This way you don't even have to find out what is locking the folder... 这样你甚至不必找出锁定文件夹的内容......

Start task manage and end Adb.exe. 启动任务管理并结束Adb.exe。 Thisnisnthe program that has a hold on the folder. 这个程序有一个保持文件夹。 Rename the tools folder to some other name eg. 将tools文件夹重命名为其他名称,例如。 'toolsold'. 'toolsold'。 Then extract the zip file containing the new tools folder. 然后解压缩包含新工具文件夹的zip文件。 Rerun the updates and it should be detected as updated and it should proceed with the outstanding tasks. 重新运行更新,应将其检测为已更新,并应继续执行未完成的任务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM