Android java.lang.VerifyError? [英] Android java.lang.VerifyError?
问题描述
在我的 Android 应用中,我总是收到验证错误!我不知道为什么.每当我包含外部 JAR 时,当我尝试启动我的应用程序时,我总是会收到验证错误(除了一次,当我包含 Apache Log4j 时.)
In my Android app, I always get VerifyErrors! And I cannot figure out why. Whenever I include a external JAR, I always get VerifyErrors when I try to launch my app (except for once, when I included Apache Log4j.)
我通常通过获取库的源代码并将其添加到我的项目中来解决这个问题,但我试图将 GData 客户端库.
I usually get around this by taking the source of the library and adding it to my project, but I am trying to put the GData client library.
我可以在源代码中得到它,但它的依赖项(mail.jar、activation.jar、servlet-api.jar)我不能,所以我得到了验证错误.我想一劳永逸地找到这个问题的根源.我在网上看了一下,好像都说class文件不全?我不知道.
I can get this in source, but it's dependencies (mail.jar, activation.jar, servlet-api.jar) I cannot, so I get verify errors. I would like to get to the root of this problem once and for all. I looked on the internet, but they all seem to talk about incomplete class files? which I do not know of.
推荐答案
Android 使用不同的类文件格式.您是否通过 Android SDK 附带的dx"工具运行第 3 方 JAR 文件?
Android uses a different class file format. Are you running the 3rd party JAR files through the "dx" tool that ships with the Android SDK?
这篇关于Android java.lang.VerifyError?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!