I fixed this - this code is where the problem is: int bits = getBitLength(); bits = (((bits % 8) != 0) ? (bits += (bits % 8)) : bits);
When I assigned the result of the expression in the second line to a new variable instead of back to int bits, the problem went away. The clue was in http://code.google.com/p/android/issues/detail?id=2868 - may be the same kind of issue. M. On Apr 20, 4:32 pm, Dan Bornstein <danf...@android.com> wrote: > On Mon, Apr 19, 2010 at 4:26 PM, Michael Newton > > <michael.new...@gmail.com> wrote: > > I hope someone can offer some insight on this problem. My build was > > failing with a dex error. After I turned verbosity up to debug I got > > the following: [...] > > [apply] com.android.dx.util.ExceptionWithContext: shouldn't happen > > [...] > > [apply] ...while placing debug info for > > com.sshtools.j2ssh.transport.publickey.SshPublicKey.getFingerprint: > > ()Ljava/lang/String; > > [...] > > > Here is the source of the class where it is failing to place debug > > info: > > This looks like a bug in dx (the tool that turns .class files into > .dex files). Since compilers can produce different output for the same > source, it's much more interesting to see the compiled .class file > that is being processed. > > Please file a bug by following the directions at > <http://source.android.com/report-bugs>. Again, in this case, > attaching the .class file that fails is much better than just > including the source text. > > As a workaround, you might try compiling without debugging info (that > is, removing "-g" from your javac command line). You might also try > splitting the failing method (getFingerPrint) in various places (e.g., > put the try body in a separate method), as that will change the > emitted code and has a good chance of avoiding the problem. > > Cheers, > > -dan > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group > athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en