Android:更新到 Android SDK 工具修订版 7 时遇到问题
目前我有 Android SDK 2.1(+工具修订版 4)。我想升级到 Android SDK 2.2。当我尝试这样做时,我被告知我需要先将 Android SDK 工具升级到修订版 7。所以我同意,该过程开始,然后我收到一个错误:
-=警告! =- 文件夹重命名或移动失败。在 Windows 上这个 通常意味着一个程序是 使用该文件夹(例如 Windows 资源管理器或您的防病毒软件。) 请暂时停用您的 防病毒软件。还请关闭 任何正在运行的程序可能是 访问目录 'D:\Install\Programming\android-sdk-working-dir\android-sdk_r04-windows\android-sdk-windows\too!s'。 准备好后,按“是”重试。
下载 Android SDK 工具, 修订版 7 安装 Android SDK 工具,修订版 7
重命名失败 目录 D:\Install\Programming\android-sdk-working-dir\android-sdk_r04-windows\android-sdk-windows\tools 到 D:\Install\Programming\android-sdk-working-dir\android-sdk_r04-windows\android-sdk-windows\temp\ToolPackage.old01。
我知道 http/https 和防病毒问题。所以我关掉了我的AV。我还关闭了任何可能持有该文件夹句柄的应用程序。 Eclipse 也被关闭(我通过命令行启动管理器)。但是我仍然遇到同样的错误。
看起来唯一可以保存该文件夹句柄的应用程序是管理器本身,因为它的起始目录是错误抱怨的目录(“\tools”)。
我使用的是Win XP Pro + SP3。我以管理员身份运行。
有人有想法吗?
Currently I have Android SDK 2.1 (+ tools revision 4). I'd like to upgrade to Android SDK 2.2. When I try to do it I'm informed I need to upgrade Android SDK Tools to revision 7 first. So I agree, the process starts and then I get an error:
-= warning! =- A folder failed to be renamed or moved. On Windows this
typically means that a program Is
using that Folder (for example Windows
Explorer or your anti-virus software.)
Please momentarily deactivate your
anti-virus software. Please also close
any running programs that may be
accessing the directory
'D:\Install\Programming\android-sdk-working-dir\android-sdk_r04-windows\android-sdk-windows\too!s'.
When ready, press YES to try again.Downloading Android SDK Tools,
revision 7 Installing Android SDK
Tools, revision 7Failed to rename
directory
D:\Install\Programming\android-sdk-working-dir\android-sdk_r04-windows\android-sdk-windows\tools to
D:\Install\Programming\android-sdk-working-dir\android-sdk_r04-windows\android-sdk-windows\temp\ToolPackage.old01.
I am aware of http/https and antivirus issues. So I disactivated my AV. I also closed any application that might hold a handle to the folder. Eclipse is also closed (I start the manager via command line). However I still get the same error.
Looks like the only app that can hold a handle to the folder is the manager itself, because its starting directory is the one the error complains about ('\tools').
I am on Win XP Pro + SP3. I run as admin.
Does anyone have an idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(19)
我认为他们在更高版本的工具中解决了这个问题,但我不久前遇到了这个问题。这就是我所做的:
tools\
复制到 SDK 目录中的scrap\
scrap\
目录中 Ranandroid
scrap\
目录吗?我可能还必须更改指向
tools\PATH
) code> 在此过程中指向scrap\
——我对细节有点模糊。I think they fixed this problem in the later version of the tools, but I ran into this a while back. Here's what I did:
tools\
toscrap\
within the SDK directoryandroid
from thescrap\
directoryscrap\
directory when doneI might have had to also change environment variables (e.g.,
PATH
) that had been pointing totools\
to point toscrap\
during this process -- I'm a bit fuzzy on the details.尝试杀死 adb.exe 进程。它起作用了。为我。
Try just kill adb.exe process. It worked. for me.
在 Eclipse 中转到 Window -> Android SDK 和 AVD 管理器并从那里升级。
在我的案例中工作过。
In eclipse goto Window -> Android SDK and AVD manager and upgrade from there.
Worked in my case.
在我的例子中,只需以管理员身份运行“android.bat”(位于工具文件夹中)就可以正常工作。
Simply running "android.bat" (located in the tool folder) as admin worked fine in my case.
确保您以管理员身份运行 SDK Manager(右键单击并选择以管理员身份运行)。如果从命令行运行它,请以管理员身份启动命令行。
Make sure you run SDK Manager as an administrator (Right-click and choose run as administrator). If running it from the command line, start the command line as an administrator.
这些都不适合我。
我修改了
scrap\
目录中的 android.bat 文件,我曾尝试更新原始tools\
目录。我将 "%tools_dir%" 替换为正确的路径(保留引号)。称呼
None of these worked for me.
I modified the android.bat file in the
scrap\
directory i had tried to update the originaltools\
directory. I replaced the "%tools_dir%" with the the correct path (keeping the quotes).call
我遇到了这个问题,我尝试了上述所有解决方案,但这些都不起作用。
然后,在我通过打开 android SDK 管理器成功更新所有 Android API 工具后不久,我下载了 android SDK 并重新安装它。
顺便说一句,Android.4 看起来很棒,是我用过的最好的移动操作系统。
I had this issue and I tried every above solution but those were didn't work.
Then I downloaded the android SDK and reinstalled it, soon after I managed to get update all Android API tools by opening up the android SDK Manager.
By the way Android.4 seems awesome, the best mobile OS I have ever had.
对我有用的是从没有项目的新工作区进行更新,将 Android SDK 位置设置为与之前的工作区相同,然后从那里进行更新。我认为这些项目仍在文件夹中。
尝试了管理员修复,但这对我不起作用。另外,我已经从 Android SDK 和 AVD 管理器进行更新,所以这不是解决方案。杀死 adb.exe 只会给我带来很多错误。即使重新启动后,我仍然收到文件夹错误。
What worked for me is updating from a new workspace with no projects, setting the Android SDK location to the same as the previous workspace, and updating from there. I think the projects are holding on the folder.
Tried the admin fix but that didn't work for me. Also I'm already updating from the Android SDK and AVD manager so that's not the solution. And killing the adb.exe just gave me a lot of errors. I kept getting the folder error, even after rebooting.
问题是 java.exe 锁定了
\tools
文件夹。但是,java.exe
是通过运行SDK Manager
本身来启动的。但是,当使用上述 scrap 方法时(即从\scrap
文件夹运行android.bat
),java.exe
不会锁定\工具
也不是废料。它只是使用
The trouble is java.exe which is locking the
\tools
folder. Howeverjava.exe
is started by runningSDK Manager
itself. However when using the scrap method described above (ie runningandroid.bat
from\scrap
folder)java.exe
is NOT locking\tools
nor scrap .It just uses
该文件夹被存储库下的包锁定。对于存储库下的每个包,更改 android 版本,重新启动 eclipse,然后再次运行更新。不应出现错误消息。
The folder is locked by the packages under the repository. For each package under the repository, change the android version, restart the eclipse and then run the update again. The error message should not be appear.
单独运行 avd 管理器(无需启动 eclipse)对我有用。
Running the avd manager by itself (without starting eclipse) worked for me.
这对我有用:
SDKManager 在读取位于 \tools\
的 source.property 文件时锁定自身
我使用了 Sysinternals 的 Process Explorer 实用程序,如下所示:
1° 执行 Process Explorer
2º 选择“查找文件或 DLL”并搜索“属性”
3° 双击工具文件夹中列出的文件
4° 在底部窗口的文件上右键单击并选择“关闭句柄”
5° 再次尝试继续安装
再见,
何塞
This has worked for me:
The SDKManager lock itself while reading the source.property file located at \tools\
I've used the Process Explorer utility from Sysinternals as follows:
1º execute Process Explorer
2º Choose "Find File or DLL" and search for "property"
3º Double-click on the file listed located at tools folder
4º At the bottom window right-mouse on file and choose "Close handle"
5º Try again to continue with the installation
So long,
Jose
和 Jose 一样,我能够找到一个正在运行的进程,该进程在 Tools 文件夹中打开了文件,但在我的例子中,崩溃的是 SDK Manager 的早期版本。我使用类似的步骤(在 Windows 7 上)来查找它:
使用 Sysinternals 中的 Process Explorer 实用程序,如下所示:
干杯,
Johno!
Like Jose, I was able to find a running process that had files open in the Tools folder, but in my case it was a previous version of the SDK Manager that had crashed. I used similar steps (on Windows 7) to find it :
Used the Process Explorer utility from Sysinternals as follows:
Cheers,
Johno!
只需安装这个
并终止使用该文件夹的进程
Just install this
and kill the proccess that use the folder
我多次遇到同样的问题(无法移动平台工具文件夹)。我尝试了所有方法,将工具复制到“废料”文件夹并运行 android.bat 并关闭可能正在起诉工具文件夹的防病毒软件和资源管理器。不幸的是,这些都不起作用。我在一些论坛上遇到了一个对我有用的解决方案。
1.找到“temp”文件夹,可以找到“tools_r05-windows.zip”或其他
您将更新的文件。
2.解压它。
3.在这里你会找到“tools_r05-windows”并复制该文件中的所有文件。
应该更新哪个文件。
4.复制到“工具”文件夹。
这是平台工具的手动更新,稍后您也可以将 SDK 版本更新到最新。
I faced this very same problem a lot of times (unable to move platform-tools folder). I tried everything copying tools to a 'scrap' folder and running the android.bat and turning off anti-virus and explorer that might possibly be suing the tools folder. None of thse worked unfortunately.I came across a solution in some forum which worked for me.
1. Find the "temp" folder and you can find the "tools_r05-windows.zip" or other
files which you will update.
2. unzip it.
3. here you will find the "tools_r05-windows" and copy all the files in the file.
which should be updated file.
4. copy to the "tools" folder.
This is a manual update of the platform tools and later you can update the SDK version to the latest as well..
我手动运行 android.bat 并且必须以管理员身份运行
i manually ran android.bat and I had to run as admin
构建卢卡斯的答案:
在尝试更新/替换
/tools/lib/
文件时,我不断遇到目标文件夹访问被拒绝
的情况。这是我的修复:您可以删除
/tools/
文件夹,然后再次手动添加它,并手动将项目从最新的/temp/
zip 版本移动到您的/工具/
文件夹。Building off Lucas's answer:
I kept running into a
Destination Folder Access Denied
in trying to update/replace/tools/lib/
files. Here was my fix:You can delete the
/tools/
folder then manually add it again and manually move items from the latest/temp/
zip version to your/tools/
folder.程序运行时无法升级工具。关闭SDK。将
zip
文件内容的folder
工具手动替换到temp
文件夹中。Unable to upgrade tools with the program running. Close the SDK. Replace the
folder
tools for the contents of thezip
file into thetemp
folder manually.我尝试了所有各种建议,除了卸载和重新安装整个 sdk 之外,仍然收到错误,包括禁用缩略图,这是对于无法重命名的文件夹的最常见建议。我从 Microsoft 下载了免费的“processexplorer”来查看哪些进程正在使用该文件夹,在禁用所有启动和非 Microsoft 进程并发现没有进程使用 platform-tools 文件夹后,我仍然收到错误,并发现我尝试升级后无法重命名。
我的解决方案是复制并粘贴 android-sdk 文件夹中“temp”文件夹中找到的 platform-tools 文件夹。每次升级时,我都会在其中找到平台工具的副本,尽管对于版本 19,平台工具已被压缩,并且临时文件夹包含我留下的版本 18 和 17。
I tried all the various suggestions short of uninstalling and reinstalling the whole sdk and still got the error, including disabling thumbnails, which is the most common suggestion for folders you can't rename. I downloaded the free "processexplorer" from Microsoft to see what processes were using the folder, and after disabling all startup and non-Microsoft processes and finding no processes to be using the platform-tools folder, I still got the error, and found I couldn't rename it after the upgrade attempt.
The solution for me was to copy and paste the platform-tools folder found in the 'temp' folder in the android-sdk folder. Every upgrade I find a copy of the platform-tools in there, although for version 19 the platform-tools was zipped and the temp folder included versions of 18 and 17 which I left.