安卓+ Zip4j-1.3.1罐抛出的VerifyError [英] Android + Zip4j-1.3.1 jar throws VerifyError

查看:146
本文介绍了安卓+ Zip4j-1.3.1罐抛出的VerifyError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用zip4j jar文件在我的Andr​​oid项目密码保护的压缩文件中的应用程序。复制lib文件夹和放罐;把它添加到构建路径。在code编译罚款。但是,当我运行该项目它给的VerifyError。

请注意:它工作正常,如果我添加源$ C ​​$ C的项目,而不是罐子

  E / dalvikvm(1502):找不到类的net.lingala.zip4j.core.ZipFile,从法a.test.zip.ZipHelper.zipFilesWithStandardZipEncryption引用
W / dalvikvm(1502):VFY:无法解析新实例45(LNET /林加拉语/ zip4j /核心/ ZipFile中)在La /测试/ ZIP / ZipHelper;
D / dalvikvm(1502):VFY:更换运code输入0x22在0x002a
W / dalvikvm(1502):VFY:无法解决的异常类46(LNET /林加拉语/ zip4j /异常/抛出:Zip​​Exception;)
W / dalvikvm(1502):VFY:无法找到于地址0x78异常处理程序
W / dalvikvm(1502):VFY:拒绝拉/测试/ ZIP / ZipHelper; .zipFilesWithStandardZipEncryption(Landroid /内容/语境;)V
W / dalvikvm(1502):VFY:拒绝运code 0X0D为0x0078
W / dalvikvm(1502):VFY:拒绝拉/测试/ ZIP / ZipHelper; .zipFilesWithStandardZipEncryption(Landroid /内容/语境;)V
W / dalvikvm(1502):验证拒绝类LA /测试/ ZIP / ZipHelper;
D / AndroidRuntime(1502):关闭虚拟机
W / dalvikvm(1502):主题ID = 1:螺纹退出与未捕获的异常(组= 0x4001d800)
 

解决方案

在哪里你把你的jar文件? 没有必要的,但在某些情况下,它的工作原理如下:你需要把你的罐子资产的文件夹。那么您配置的Java builtpath。从资产文件夹添加的罐子,然后(在Eclipse中,获得订购和出口标签,检查jar文件)中导出的罐子。 它会自动将其添加到应用程序中lib文件夹。我不知道为什么,但它并没有解决其他方式(coppying在lib中的jar并将其添加到builtpath)在我的应用程序之一。 你也可以改变你的Java编译器。

I am trying to use the zip4j jar file in my android project to password protect the zip file in the application. Copied the jar in lib folder & added it to build path. The code compiles fine. But when I run the project it gives VerifyError.

NOTE: It works fine if I added the source code to the project instead of the jar.

E/dalvikvm(1502): Could not find class 'net.lingala.zip4j.core.ZipFile', referenced from method a.test.zip.ZipHelper.zipFilesWithStandardZipEncryption
W/dalvikvm(1502): VFY: unable to resolve new-instance 45 (Lnet/lingala/zip4j/core/ZipFile;) in La/test/zip/ZipHelper;
D/dalvikvm(1502): VFY: replacing opcode 0x22 at 0x002a
W/dalvikvm(1502): VFY: unable to resolve exception class 46 (Lnet/lingala/zip4j/exception/ZipException;)
W/dalvikvm(1502): VFY: unable to find exception handler at addr 0x78
W/dalvikvm(1502): VFY:  rejected La/test/zip/ZipHelper;.zipFilesWithStandardZipEncryption (Landroid/content/Context;)V
W/dalvikvm(1502): VFY:  rejecting opcode 0x0d at 0x0078
W/dalvikvm(1502): VFY:  rejected La/test/zip/ZipHelper;.zipFilesWithStandardZipEncryption (Landroid/content/Context;)V
W/dalvikvm(1502): Verifier rejected class La/test/zip/ZipHelper;
D/AndroidRuntime(1502): Shutting down VM
W/dalvikvm(1502): threadid=1: thread exiting with uncaught exception (group=0x4001d800)

解决方案

where did you put your jar file? not necessary, but in some cases it works as follows: you need to put your jar in assets folder. then you configure your Java builtpath. add the jar from assets folder, then (in eclipse, get to order and export tab and check the jar file) export the jar. it automatically adds it into your applications lib folder. i don't know why but it didn't work the other way around (coppying the jar in lib and adding it to builtpath) in one of my applications. you can also change your java compiler.

这篇关于安卓+ Zip4j-1.3.1罐抛出的VerifyError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆