tags:

views:

173

answers:

2

When I added the JExcelAPI http://jexcelapi.sourceforge.net/ to the class path and run my app, I get: trouble writing output: shouldn't happen [2009-07-16 14:32:19 - xxx] Conversion to Dalvik format failed with error 2

any idea? thanks

A: 

I used the dx tool, this is what i get

trouble writing output: com.android.dx.util.ExceptionWithContext: shouldn't happen at com.android.dx.util.ExceptionWithContext.withContext(ExceptionWithCon text.java:46) at com.android.dx.dex.file.DebugInfoItem.place0(DebugInfoItem.java:79) at com.android.dx.dex.file.OffsettedItem.place(OffsettedItem.java:241) at com.android.dx.dex.file.MixedItemSection.placeItems(MixedItemSection. java:312) at com.android.dx.dex.file.DexFile.toDex0(DexFile.java:525) at com.android.dx.dex.file.DexFile.toDex(DexFile.java:196) at com.android.dx.command.dexer.Main.writeDex(Main.java:406) at com.android.dx.command.dexer.Main.run(Main.java:143) at com.android.dx.command.dexer.Main.main(Main.java:120) at com.android.dx.command.Main.main(Main.java:87) Caused by: java.lang.RuntimeException: shouldn't happen at com.android.dx.dex.file.DebugInfoEncoder.emitLocalsAtAddress(DebugInf oEncoder.java:314) at com.android.dx.dex.file.DebugInfoEncoder.convert0(DebugInfoEncoder.ja va:220) at com.android.dx.dex.file.DebugInfoEncoder.convert(DebugInfoEncoder.jav a:155) at com.android.dx.dex.file.DebugInfoItem.encode0(DebugInfoItem.java:188) at com.android.dx.dex.file.DebugInfoItem.encode(DebugInfoItem.java:144) at com.android.dx.dex.file.DebugInfoItem.place0(DebugInfoItem.java:76) ... 8 more ...while placing debug info for jxl.write.biff.NumberFormatRecord.trimInvalidCha rs:(Ljava/lang/String;)Ljava/lang/String; ...while placing com.android.dx.dex.file.DebugInfoItem@1d9b47 ...while writing section 10

In the function jxl.write.biff.NumberFormatRecord.trimInvalidChars() it seems that some parenthesis are missing with the use of "? :" I changed the two lines that seemed to have a problem, i imported all the sources .java from JexcelAPI, and i added the external jar "log4j", now i get :

warning: Ignoring InnerClasses attribute for an anonymous inner class that doesn't come with an associated EnclosingMethod attribute. (This class was probably produced by a broken compiler.)