Android 错误:如何防止在 Eclipse 编译过程中 APK 文件过大?

发布于 2024-11-16 17:40:19 字数 929 浏览 2 评论 0原文

我在这里遇到了一个问题,这肯定会造成一些挫折。这就是发生的事情。

首先,我在 Windows 资源管理器中移动一些大文件。我将 4 GB 文件复制到剪贴板中以移动到某个地方。后来我选择不复制该文件。

第二。时间流逝。当文件仍在剪贴板中时,我回到 eclipse 并忘记了剪贴板中的文件。然后,我单击了另一个项目中的 XML 布局文件。并将其复制到剪贴板中以移动到另一个项目。

第三。认为布局位于剪贴板中,然后我将布局文件粘贴到未粘贴的项目中。相反,大文件开始导入到项目中! 4.3 演出...进入布局文件夹...

哦不

所以我立即点击了 X 取消操作。一切都被卡住了。

从那时起,每次我编译时,我都会经历这个巨大的过程。

我已经检查了项目中的每个文件,没有看到半复制大文件的痕迹..但是编译器一直想要处理该文件..这肯定是一场噩梦。

Overgrown APK

修复尝试..

在吹掉 gen 和 bin 后,我重新加载了 eclipe,我认为一切都很好......清理项目..它编译..完美..然后进行代码更改...重新编译..BOOM。 APK 过度增长,现在 .... 转换为 Dalvik 格式失败,错误 1

​​apk 文件增长

log messages

此处输入图像描述">

就像哇.. 它会填满我的硬盘..

ahhh

在此处输入图像描述

I have run into a issue here that is causing some setbacks for sure. Here is what happened.

First, I was moving some large files around in Windows Explorer. And I Copied a 4 gb file into my clipboard to move somewhere. I later choose not to copy the file.

Second. Time passes. While the file was still in clipboard, I went back into eclipse and forgot about the file that I had in clipboard. I then clicked on a XML layout file from a different project. And copied that into the clipboard to move to another project.

Third. Thinking that the layout was in the clipboard I then pasted the layout file into the project where it did not get pasted. Instead the large file began importing into the project! 4.3 gigs... into the layout folder...

ohh noo

So I immediatly hit the X cancle operation. And everything jammed up.

Since then, every time I compile I have this huge process that goes through.

I have gone through every file in the project and see no traces of the half copied large file.. but the compiler keeps on wanting to process the file.. what a nightmare for sure.

Overgrown APK

Fix Attempts..

after blowing away the gen and bin I reloaded eclipe and I thought things were all good... Cleaned project.. it compiled.. perfect.. then made code changes... recompile .. BOOM. APK overgrowth and now .... Conversion to Dalvik format failed with error 1

apk file growth

log messages

enter image description here

After the 5+ gigs in growth.. I have come the conclusion that the 4gig copy paste error is not the issue...

like wow.. it will fill my hd up..

ahhh

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(3

苍暮颜 2024-11-23 17:40:19

我的回答不是很复杂,但应该很快。
只需创建新项目并将所有类和资源复制到其中即可。

My answer is a not very sophisticated, but it should be quick.
Just create new project and copy all your classes and resources into it.

一刻暧昧 2024-11-23 17:40:19

通过选择 Project => 清理项目在 Eclipse 中清理即可工作

Clean up the Project by selecting Project => Clean in Eclipse and it will work

无敌元气妹 2024-11-23 17:40:19

关闭 eclipse,然后手动删除 genbin 目录中的所有内容。开始日食。

如果这对您没有帮助,请关闭 eclipse,删除 .project.classpath 文件。然后启动 eclipse 并确保它无法再加载您的项目。然后将 Android 项目重新导入到 eclipse(通过 New -> Android Project -> 选择“Create project from Existing Source”。

Close eclipse, then remove manually everthing from gen and bin dirs. Start eclipse.

If that didn't help you, then close eclipse, delete the .project and .classpath files. Then start eclipse and make sure it can't load your project anymore. Then re-import Android project to eclipse (via New -> Android Project -> select "Create project from existing source".

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