windows 使用 adb 安装“找不到 EOCD”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8286233/
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
"EOCD not found" with adb install
提问by Laurent Rodier
When an Android project exceeds about 2MB, I keep getting "EOCD not found, not zip" when trying to install the signed application on a device using adb install. This problem is limited to Windows (Windows XP) because I found no problem installing the same application on a fresh Ubuntu box.
当一个 Android 项目超过大约 2MB 时,当我尝试使用 adb install 在设备上安装签名的应用程序时,我不断收到“EOCD not found, not zip”。这个问题仅限于 Windows (Windows XP),因为我发现在新的 Ubuntu 机器上安装相同的应用程序没有问题。
I could reproduce the problem with the HelloWorld application: adb will fail as soon as I add files to exceed 2MB (I generate a 2.7 MB apk file) in the assets folder.
我可以重现 HelloWorld 应用程序的问题:只要我在资产文件夹中添加的文件超过 2MB(我生成了一个 2.7 MB 的 apk 文件),adb 就会失败。
I am almost sure such problem didn't occur in June; unfortunately it seems I can't get back to May/June situation.
我几乎可以肯定这样的问题在 6 月份没有发生;不幸的是,我似乎无法回到五月/六月的情况。
Any ideas?
有任何想法吗?
回答by Vasu
This problem does not seem to be related to size IMO. As in my current project, the APK has size more than 9 MB. I had a similar problem and was getting almost similar logs as below in eclipse console
这个问题似乎与 IMO 的大小无关。在我当前的项目中,APK 的大小超过 9 MB。我遇到了类似的问题,并且在 Eclipse 控制台中获得了与下面几乎相似的日志
[2011-12-06 10:35:38 - MyProject] Failed to install MyProject.apk on device
[2011-12-06 10:35:38 - MyProject] (null)
[2011-12-06 10:35:38 - MyProject] Launch canceled!
and on window's command console I was getting EOCD not found, not Zip
message while installing the same APK (build using eclipse). But cleaning and rebuilding the project solved the problem.
在窗口的命令控制台上,我EOCD not found, not Zip
在安装相同的 APK(使用 eclipse 构建)时收到消息。但是清理和重建项目解决了这个问题。
In my case, I had had deleted some back up (non-java) files from src directory, which eclipse did not know.
就我而言,我已经从 src 目录中删除了一些备份(非 java)文件,eclipse 不知道这些文件。