“未找到EOCD”使用 adb 安装
当 Android 项目超过大约 2MB 时,当我尝试使用 adb install 在设备上安装签名的应用程序时,我会不断收到“EOCD 未找到,不是 zip”的消息。这个问题仅限于 Windows (Windows XP),因为我发现在新的 Ubuntu 机器上安装相同的应用程序没有问题。
我可以使用 HelloWorld 应用程序重现该问题:只要我在资产文件夹中添加的文件超过 2MB(我生成了 2.7 MB apk 文件),adb 就会失败。
我几乎可以肯定六月份不会出现这样的问题;不幸的是,我似乎无法回到五月/六月的情况。
有什么想法吗?
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.
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.
I am almost sure such problem didn't occur in June; unfortunately it seems I can't get back to May/June situation.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在我看来,这个问题与尺寸无关。在我当前的项目中,APK 的大小超过 9 MB。我遇到了类似的问题,并且在 Eclipse 控制台
和 Windows 命令控制台中获得了几乎类似的日志,在安装相同的 APK(使用 Eclipse 构建)时,我收到了
EOCD not find, not Zip
消息。但清理和重建项目解决了问题。就我而言,我从 src 目录中删除了一些备份(非 java)文件,而 eclipse 不知道这些文件。
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
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.In my case, I had had deleted some back up (non-java) files from src directory, which eclipse did not know.