eclipse fails to “build workspace” on large android files…?

前提是你 提交于 2019-12-24 14:20:06

问题


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)


回答1:


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.



来源:https://stackoverflow.com/questions/3212941/eclipse-fails-to-build-workspace-on-large-android-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!