有很多与此类似的问题,但我已经尝试了所有方法,但没有帮助。
错误是:
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
仅当我尝试添加用于加密的外部 jar - gnu-crypto.jar 时才会发生这种情况。我试过的:
- 项目 -> 清理
- 从 eclipse 中删除项目并重新导入
- 将 proguard 文件(bin 和 lib 目录)更改为最新
- 将 java -jar "%PROGUARD_HOME%"\lib\proguard.jar %* 更改为 java -jar "%PROGUARD_HOME%"\lib\proguard.jar %1 %2 %3 %4 %5 %6 %7 % 8%9
- 取消选中“当外部 jar 包含 native 库时强制出错”选项(就像您所做的那样)和清理项目
- 从 Java Build Path 中删除所有 jar 文件,然后是 Android Tools -> Fix project properties,然后再次添加外部 jar
最佳答案
gnu-crypto 的 2.1.0 版本似乎有些奇怪。在其上手动运行 dx 会产生您提到的错误。
您可以尝试将 gnu-crypto 的源代码直接添加到您的应用程序中,或者改用 2.0.1 版本。
关于android - 在 eclipse 中转换为 dalvik 格式失败,出现错误 1(添加 gnu-crypto.jar 时),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8952187/