问题描述
我有第三方的jar(,我不能改变的),使用 java.beans.Introspector中
, java.beans.BeanInfo中
和 java.beans.PropertyDescriptor中
。
我如何使用的jar在我的Android应用程序?
它无法加载类(使用内部检查
)来自届党的jar:
WARN / dalvikvm(780):VFY:无法解析静态方法6325:Ljava /豆/内部检查; .getBeanInfo(Ljava /朗/类)Ljava /豆/ BeanInfo的;
WARN / dalvikvm(780):VFY:无法解决的异常类962(Ljava /豆/ IntrospectionException在;)
WARN / dalvikvm(780):验证拒绝类Lorg / thirdpartyjar / SomeClass的;
唯一的解决方案是一个维护的噩梦:叉所有届党从源罐和重写他们,所以他们不使用的java.beans *类(可能通过更换他们openbeans)。
然后,每一次的届党罐中的一个发布修补程序(例如,用于关键的安全漏洞),这样做的一遍的。
I have 3rd party jar (which I can't change) that uses java.beans.Introspector
, java.beans.BeanInfo
and java.beans.PropertyDescriptor
.
How can I use that jar in my android application?
It fails loading the class (which uses Introspector
) from the 3th party jar:
WARN/dalvikvm(780): VFY: unable to resolve static method 6325: Ljava/beans/Introspector;.getBeanInfo (Ljava/lang/Class;)Ljava/beans/BeanInfo;
WARN/dalvikvm(780): VFY: unable to resolve exception class 962 (Ljava/beans/IntrospectionException;)
WARN/dalvikvm(780): Verifier rejected class Lorg/thirdpartyjar/SomeClass;
The only solution is a maintenance nightmare: Fork all 3th party jars from source and rewrite them so they don't use java.beans.* classes (possibly by replacing them for openbeans).
Then, every time one of those 3th party jars releases a hotfix (for example for a critical security bug), do that all over again.
这篇关于使用使用java.beans中的类(内部检查,BeanInfo的或的PropertyDescriptor)罐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!