android getting java lang verify error when using external java lib

女生的网名这么多〃 提交于 2019-12-08 02:48:38

问题


i am using a external library in my android project getting javalang verify error when calling the class where that library imported, it is java.jxl library

any help please I created a directory called lib inside my library project and then referred it in the library. And this library is linked with the original android app.

also i getting below info

11-16 18:12:40.230: W/dalvikvm(14253): VFY: unable to resolve static method 260: Ljxl/Workbook;.getWorkbook (Ljava/io/InputStream;)Ljxl/Workbook;
11-16 18:12:40.230: D/dalvikvm(14253): VFY: replacing opcode 0x71 at 0x000c
11-16 18:12:40.230: W/dalvikvm(14253): VFY: unable to resolve exception class 124 (Ljxl/read/biff/BiffException;)
11-16 18:12:40.230: W/dalvikvm(14253): VFY: unable to find exception handler at addr 0x11
11-16 18:12:40.230: W/dalvikvm(14253): VFY:  rejected Lcom/kd/hockymain/Kdexcel;.getfile ()V
11-16 18:12:40.230: W/dalvikvm(14253): VFY:  rejecting opcode 0x0d at 0x0011
11-16 18:12:40.230: W/dalvikvm(14253): VFY:  rejected Lcom/kd/hockymain/Kdexcel;.getfile ()V
11-16 18:12:40.230: W/dalvikvm(14253): Verifier rejected class Lcom/kd/hockymain/Kdexcel;

回答1:


Libraries should be put in the libs/ directory (not lib/, note the trailing slash). See this answer.

This will convert the compiled libraries code to the Dalvik format, and will provide the symbols definitions for Eclipse to work.



来源:https://stackoverflow.com/questions/13415167/android-getting-java-lang-verify-error-when-using-external-java-lib

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!