Java 从 Windows 8 中提取 adt-bundle-windows-x86_64-20140702 时出现此错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24724138/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
While extracting adt-bundle-windows-x86_64-20140702 this error from windows 8
提问by user3776347
**While extracting adt-bundle-windows-x86_64-20140702 from windows 8 this error occurred
**从 Windows 8 中提取 adt-bundle-windows-x86_64-20140702 时发生此错误
(! D:\Bela\Work\adt-bundle-windows-x86_64-20140702.zip: Cannot create folder adt-bundle-windows-x86_64-20140702\sdk\tools\lib\monitor-x86\features\com.android.ide.eclipse.hierarchyviewer.feature_23.0.2.1259578\META-INF\maven\adt.group\com.android.ide.eclipse.hierarchyviewer.feature
The filename or extension is too long.
! D:\Bela\Work\adt-bundle-windows-x86_64-20140702.zip: Cannot create adt-bundle-windows-x86_64-20140702\sdk\tools\lib\monitor-x86\features\com.android.ide.eclipse.hierarchyviewer.feature_23.0.2.1259578\META-INF\maven\adt.group\com.android.ide.eclipse.hierarchyviewer.feature\pom.xml
Total path and file name length must not exceed 260 characters
The system cannot find the path specified.
! D:\Bela\Work\adt-bundle-windows-x86_64-20140702.zip: Cannot create adt-bundle-windows-x86_64-20140702\sdk\tools\lib\monitor-x86\features\com.android.ide.eclipse.hierarchyviewer.feature_23.0.2.1259578\META-INF\maven\adt.group\com.android.ide.eclipse.hierarchyviewer.feature\pom.properties
Total path and file name length must not exceed 260 characters
The system cannot find the path specified.)
How can I fix this?
我怎样才能解决这个问题?
回答by straightface
To further simplify the answer to this: the reason that you want to extract it to C: is that if you extract it to somewhere else (like you desktop) you will be adding characters to the file name. If you extract it as it is to the desktop, it will add "C:/users/username/desktop/adt-bundle-windows-x86_64-20140702" to the paths of all of the files and put you at risk for exceeding the max path name size. If you do it straight to C: (or any drive) and give it a short name like android, you will only add C:/android to the path.
为了进一步简化这个问题的答案:您想将其提取到 C: 的原因是,如果您将其提取到其他地方(如桌面),您将在文件名中添加字符。如果您将其按原样解压缩到桌面,它会将“C:/users/username/desktop/adt-bundle-windows-x86_64-20140702”添加到所有文件的路径中,并使您面临超出最大路径名大小。如果您直接在 C:(或任何驱动器)上执行此操作并为其指定一个短名称,例如 android,则您只会将 C:/android 添加到路径中。
回答by Naty722
Had this same issue and no matter how I extracted it, tried to rename stuff, etc. I kept getting the error. I thought opening the archive (in WinRAR) and dragging out the subfolders inside the adt-bundle.... folder would reduce the character count but I kept getting the error. On a whim, I tried just right-clicking the archive, choosing Extract files... and selecting the C: drive (essentially what I was already trying to do by dragging the folder) and.... it worked!! Looks like whatever WinRAR does when you drag files to extract is different than using the Extract files... option.
遇到了同样的问题,无论我如何提取它,尝试重命名内容等。我一直收到错误消息。我以为打开存档(在 WinRAR 中)并拖出 adt-bundle .... 文件夹内的子文件夹会减少字符数,但我一直收到错误消息。一时兴起,我尝试右键单击存档,选择提取文件...并选择 C: 驱动器(基本上我已经尝试通过拖动文件夹来执行此操作)并且....它起作用了!当您拖动文件进行提取时,WinRAR 所做的看起来与使用提取文件...选项不同。
Just wanted to put this here in case others run into the same issue.
只是想把它放在这里以防其他人遇到同样的问题。
回答by Vitalii Blagodir
This is a problem with WinRAR. There are two solutions:
这是 WinRAR 的问题。有两种解决方案:
- Right clickon archive - Open with- Windows Explorer- drag&drop files to any folder.
- Open archive with WinRAR - Rename folder from
adt-bundle-<os_platform>
toadt-bundle
- drag&drop files to any folder.
- 右键单击存档 -打开方式- Windows 资源管理器- 将文件拖放到任何文件夹。
- 使用 WinRAR 打开存档 - 将文件夹重命名
adt-bundle-<os_platform>
为adt-bundle
- 将文件拖放到任何文件夹。
回答by srn
My solution:
我的解决方案:
- Move the archive to the root of your hard disk, like C:\
- Rename the archive to adt.rar (strip the rest of the filename)
- Rename the folder inside the archive also to adt (open the archive and rename the root directory)
- Extract to anywhere you want
- 将存档移动到硬盘的根目录,例如 C:\
- 将存档重命名为 adt.rar(去除文件名的其余部分)
- 将存档内的文件夹也重命名为 adt(打开存档并重命名根目录)
- 提取到您想要的任何位置
Info: The problem wasn't the destination path name, it was the source path name.
信息:问题不在于目标路径名,而是源路径名。
回答by Ruma Pal
I am using the ADT for Windows 7 on a 64 bit machine. I received this error a few times while trying to extract as well.
我在 64 位机器上使用 ADT for Windows 7。我在尝试提取时也收到了几次此错误。
I resolved this by creating a folder in the C drive - C:\ADT and extracting to this location. I was able to extract without any further errors.
我通过在 C 驱动器中创建一个文件夹 - C:\ADT 并解压缩到此位置来解决此问题。我能够在没有任何进一步错误的情况下进行提取。
回答by J Wang
You can use 7-Zipto extract the file instead of the built-in Windows utility. 7-Zip will allow you to extract the file to anywhere on your machine.
您可以使用7-Zip来提取文件,而不是使用内置的 Windows 实用程序。7-Zip 将允许您将文件解压缩到机器上的任何位置。
This is a known problem on Windows 7 and Windows 8. See Issue 72539: eclipse adt bundle windows 7 64 bit will not unzipon the Android Issue Tracker.
这是 Windows 7 和 Windows 8 上的一个已知问题。请参阅问题 72539:eclipse adt bundle windows 7 64 bit 将不会在 Android 问题跟踪器上解压缩。
回答by Andrea Corti
just click "extract to" instead of drag&drop archive
只需单击“提取到”而不是拖放存档