开发者

eclipse fails to "build workspace" on large android files...?

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

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:

[console]:

[2010-07-09 15:28:39 - Dex Loader] Unable to execute dex: null

[2010-07-09 15:28:39 - myProject] Conversion to Dalvik format failed: Unable to execute dex: null

[problems window]:

Conversion to Dalvik format failed: Unable to execute dex: null

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

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

how do i get eclipse and the android sdk to accept files this big?

(system: ubuntu 10.04 x86, eclipse 3.6)


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜