“未找到EOCD”使用 adb 安装

发布于 2024-12-18 09:20:12 字数 306 浏览 0 评论 0原文

当 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜味超标? 2024-12-25 09:20:12

在我看来,这个问题与尺寸无关。在我当前的项目中,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!

和 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

[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.

In my case, I had had deleted some back up (non-java) files from src directory, which eclipse did not know.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文