简体   繁体   中英

Conversion to dalvik format failed with error 1(when adding gnu-crypto.jar) in eclipse

There are a lot of questions similar to this one but I've tried everything and it didn't help.

The error is:

stack[top0]: type{java.lang.InterruptedException}
...while working on block 01d0
...while working on method handleConfirmation:(Ljavax/security/auth/callback/ConfirmationCallback;)V
...while processing handleConfirmation (Ljavax/security/auth/callback/ConfirmationCallback;)V
...while processing gnu/crypto/auth/callback/AWTCallbackHandler.class

[2012-01-21 15:31:22 - AppName] Dx 1 error; aborting
[2012-01-21 15:31:22 - AppName] Conversion to Dalvik format failed with error 1

This happens only when I try to add external jar for encryption - gnu-crypto.jar. What I've tried:

  • Project -> Clean
  • Deleting project from eclipse and reimporting it
  • Changing proguard files(bin and lib directories) to the newest
  • Changing java -jar "%PROGUARD_HOME%"\\lib\\proguard.jar %* to java -jar "%PROGUARD_HOME%"\\lib\\proguard.jar %1 %2 %3 %4 %5 %6 %7 %8 %9
  • Unchecking "Force error when external jars contain native libraries" option (just as you did) and the cleaning project
  • Removing all jar files from the Java Build Path, then Android Tools -> Fix project properties, and adding external jar again

It appears that there's something wonky with the 2.1.0 release of gnu-crypto. Running dx on it manually produces the error you mentioned.

You could try adding the sources for gnu-crypto to your application directly, or use the 2.0.1 release instead.

Make sure you delete all the potentially double reference to jars with similar classes. This could happen by referring to different versions of android or having reference to android and jdk or a jre.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM