eclipse无法“构建工作区”在大型android文件上...? [英] eclipse fails to "build workspace" on large android files...?
问题描述
我在eclipse上遇到了一个严重的问题,我需要编译一个更大的类。用更大的意思是,该类有大约5000行代码...
i have a severe problem with eclipse, where i need to compile a somewhat larger class. by "larger" i mean, the class has about 5000 lines of code...
问题是在保存该项目时,蚀需要几秒钟(30-40) 构建工作空间。确切地说,它说 50%,并持续说30-40秒。然后,它会因以下错误而中断:
problem is that on saving this project, eclipse takes several seconds (30-40) to "build the workspace". to be exact, it says "50%" and keeps saying that for 30-40 seconds. then, it breaks with the following error:
[控制台]:
[ 2010-07-09 15:28:39-Dex Loader]无法执行dex:null
[2010 -07-09 15:28:39-myProject]转换为Dalvik格式失败:无法执行dex:空
[问题窗口] :
转换为Dalvik格式失败:无法执行dex:null
此错误是可重复的,并且会一直弹出,直到我注释掉数千个LOC,以便该文件仍然具有此5k LOC,但其中约2000个是注释。然后就可以了...
this error is reproducible and keeps popping up until i comment out several thousands LOC, so that the file still has this 5k LOC, but ~2000 of them are comments. THEN it works...
我知道5000 LOC并不是很好的编程风格,但是我现在需要这种方式...(我必须将这么多的记录写到sqlite数据库中,由于sqlite在一个rawQuery命令中没有多个SQL查询,因此我必须为需要推入db的每个数据记录执行单个rawQuery()。我写了一个文件读取器来从文件中读取此数据(需要验证等),我被此解决方案所困扰...)
i know that 5000 LOC are no really good programming style, but i need to do it this way for now ... (i have to write this much records to a sqlite database and since sqlite doesnt feature multiple sql-queries in one rawQuery-command i have to execute a single rawQuery() for each and every data record i need to push into the db.... - until i write a file reader to read this data from a file (that needs verification etc)), i'm stuck with this solution...)
我如何获得eclipse和android sdk可以接受这么大的文件吗?
how do i get eclipse and the android sdk to accept files this big?
(系统:Ubuntu 10.04 x86,Eclipse 3.6)
(system: ubuntu 10.04 x86, eclipse 3.6)
推荐答案
我相信在Dalvik中,一个类的字节码的大小不得超过64k。您必须将班级分成较小的班级。
I believe the size of a class's bytecode must not exceed 64k in Dalvik. You'll have to split the class into smaller ones.
这篇关于eclipse无法“构建工作区”在大型android文件上...?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!