无法引用的.jar库时解决超错误 [英] Unable to resolve superclass error when referencing .jar library
本文介绍了无法引用的.jar库时解决超错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
- 在我做了一个Android项目并运行它。它成功运行。
- 我用Java开发的Web服务和托管它。它成功运行。
- 在我出口的web服务成为一个.jar和将它添加到我的Android项目。
- 当我尝试在Web服务中,我得到调用一个方法的
无法解析超
错误。
我的错误日志:
无法解析Lweb /服务/ RandomWordGeneratorService的父类; (73)
Link类的Lweb /服务/ RandomWordGeneratorService;失败
找不到类的web.service.RandomWordGeneratorService,
从方法tam.miru.Login $ 1.onClick引用
VFY:无法解析新实例110 Lweb /服务/ RandomWordGeneratorService;)
在Ltam / MIRU /登录$ 1;
VFY:更换运code输入0x22在0x005a
VFY:死code 0x005c-006E在Ltam / MIRU /登录$ 1; .onClick(Landroid /视图/查看)
解决方案
刚开始升级到ADT 17后能得到这个问题。
发现外部.jar文件需要在一个'库'(与S),否则他们班不包括在创建的.dex文件夹。升级之前,一切都在一个'库'文件夹(无S)工作的罚款与我的.jar文件。
- I did an Android project and run it. It ran successfully.
- I developed a web service in Java and hosted it. It ran successfully.
- I exported the webservice into a .jar and added it to my Android project.
- When I try to call a method in the web service I get an
Unable to resolve superclass
error.
My error log:
Unable to resolve superclass of Lweb/service/RandomWordGeneratorService; (73)
Link of class 'Lweb/service/RandomWordGeneratorService;' failed
Could not find class 'web.service.RandomWordGeneratorService',
referenced from method tam.miru.Login$1.onClick
VFY: unable to resolve new-instance 110 Lweb/service/RandomWordGeneratorService;)
in Ltam/miru/Login$1;
VFY: replacing opcode 0x22 at 0x005a
VFY: dead code 0x005c-006e in Ltam/miru/Login$1;.onClick (Landroid/view/View;)
解决方案
Just started to get this issue after upgrading to ADT 17.
Discovered that external .jar files need to be in a 'libs' (with an s) folder otherwise their classes are not included in the .dex file that is created. Before the upgrade everything worked fine with my .jar files in a 'lib' folder (no s).
这篇关于无法引用的.jar库时解决超错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文