在Android Maven项目中使用Guice的VerrifyError

所以我试图让Guice在我的android maven项目中运行,并捆绑在第三方模块中。 它在testing注入的正常junittest中运行良好,但在下面附带logcat消息的VM上失败。

我不能理解的是,有很多Guice在Android上正常工作的报告。 尽pipe如此,我的代码似乎失败了从Guice注入器调用getBeanInfo()。 看来我不是唯一有这个错误的人。

有没有解决Android错误“无法解决虚拟方法Java /豆/ PropertyDescriptor”?

所以我有几个问题。 Guice是不是为我工作的原因,因为一些function被我的第三方模块调用,它会在任何地方失败,但不常见? 有没有办法从Guice中获取更多的信息,以触发有问题的getBeanInfo()? 有工作吗? 有什么渠道可供我进一步debugging。

解决scheme必须与maven兼容,因为类似问题的类似问题的解答不能应用于调整类似问题的eclipse设置。 得到“引起:java.lang.VerifyError:” (不是说我在这里得到了很多里程)。

我认为所有相关的文件都是由android maven插件的dx处理的,因为dependency:tree在范围“compile”显示了所有相关的项目,但是我不是这方面的专家。

 03-05 00:57:34.529:I / dalvikvm(2295):threadid = 3:对信号3做出反应
 03-05 00:57:34.568:I / dalvikvm(2295):将堆栈跟踪写入“/data/anr/traces.txt”
 03-05 00:57:35.059:I / dalvikvm(2295):threadid = 3:对信号3做出反应
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):无法在自己的类加载器中加载Finalizer。 将Finalizer加载到当前的类加载器中。 结果,你将无法垃圾收集这个类加载器。 要支持回收这个类加载器,请解决潜在的问题,或将Google Collections移动到您的系统类path。
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):java.io.FileNotFoundException:com / google / inject / internal / util / $ Finalizer.class
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):com.google.inject.internal.util。$ FinalizableReferenceQueue $ DecoupledLoader.getBaseUrl(FinalizableReferenceQueue.java:269)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):com.google.inject.internal.util。$ FinalizableReferenceQueue $ DecoupledLoader.loadFinalizer(FinalizableReferenceQueue.java:253)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):com.google.inject.internal.util。$ FinalizableReferenceQueue.loadFinalizer(FinalizableReferenceQueue.java:175)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):com.google.inject.internal.util。$ FinalizableReferenceQueue。(FinalizableReferenceQueue.java:100)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):com.google.inject.internal.util。$ MapMaker $ QueueHolder。(MapMaker.java:787)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):com.google.inject.internal.util。$ MapMaker $ WeakEntry。(MapMaker.java:946)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):com.google.inject.internal.util。$ MapMaker $ Strength $ 1.newEntry(MapMaker.java:312)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):com.google.inject.internal.util。$ MapMaker $ StrategyImpl.newEntry(MapMaker.java:498)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):com.google.inject.internal.util。$ MapMaker $ StrategyImpl.newEntry(MapMaker.java:419)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):com.google.inject.internal.util。$ CustomConcurrentHashMap $ ComputingImpl.get(CustomConcurrentHashMap.java:2029)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):com.google.inject.internal.Annotations $ AnnotationChecker.hasAnnotations(Annotations.java:116)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):com.google.inject.internal.Annotations.isScopeAnnotation(Annotations.java:124)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):com.google.inject.internal.ScopeBindingProcessor.visit(ScopeBindingProcessor.java:40)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):com.google.inject.internal.ScopeBindingProcessor.visit(ScopeBindingProcessor.java:30)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):com.google.inject.spi.ScopeBinding.acceptVisitor(ScopeBinding.java:59)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):com.google.inject.internal.AbstractProcessor.process(AbstractProcessor.java:55)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):com.google.inject.internal.InjectorShell $ Builder.build(InjectorShell.java:165)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):com.google.inject.Guice.createInjector(Guice.java:95)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):com.google.inject.Guice.createInjector(Guice.java:72)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):com.google.inject.Guice.createInjector(Guice.java:62)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):at za.co.mambo.cherrylist.android.CherryListActivity.onCreate(CherryListActivity.java:27)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):at android.app.Activity.performCreate(Activity.java:4465)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):at android.app.ActivityThread.access $ 600(ActivityThread.java:123)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):at android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1147)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):at android.os.Handler.dispatchMessage(Handler.java:99)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):在android.os.Looper.loop(Looper.java:137)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):在android.app.ActivityThread.main(ActivityThread.java:4424)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):在java.lang.reflect.Method.invokeNative(Native Method)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):在java.lang.reflect.Method.invoke(Method.java:511)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:784)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
 03-05 00:57:35.098:W / nalizableReferenceQueue(2295):at dalvik.system.NativeStart.main(Native Method)
 03-05 00:57:35.108:I / dalvikvm(2295):将堆栈跟踪写入“/data/anr/traces.txt”
 03-05 00:57:35.338:D / dalvikvm(2295):GC_CONCURRENT释放391K,4%释放12676K / 13127K,暂停8ms + 5ms
 03-05 00:57:35.418:W / dalvikvm(2295):VFY:无法find在签名中引用的类([Ljava / beans / PropertyDescriptor;)
 03-05 00:57:35.418:W / dalvikvm(2295):VFY:无法find在签名中引用的类([Ljava / beans / PropertyDescriptor;)
 03-05 00:57:35.418:W / dalvikvm(2295):VFY:无法find在签名中引用的类([Ljava / beans / PropertyDescriptor;)
 03-05 00:57:35.418:W / dalvikvm(2295):VFY:无法find在签名中引用的类([Ljava / beans / PropertyDescriptor;)
 03-05 00:57:35.418:W / dalvikvm(2295):VFY:无法find在签名中引用的类([Ljava / beans / PropertyDescriptor;)
 03-05 00:57:35.428:W / dalvikvm(2295):VFY:无法find签名中引用的类([Ljava / beans / PropertyDescriptor;)
 03-05 00:57:35.438:I / dalvikvm(2295):无法find从方法com.google.inject.internal.cglib.core引用的方法java.beans.Introspector.getBeanInfo $ ReflectUtils.getPropertiesHelper
 0385 00:57:35.438:W / dalvikvm(2295):VFY:无法parsing静态方法8989:Ljava / beans / Introspector; .getBeanInfo(Ljava / lang / Class; Ljava / lang / Class; / BeanInfo的;
 03-05 00:57:35.438:D / dalvikvm(2295):VFY:0x000creplace操作码0x71
 03-05 00:57:35.458:W / dalvikvm(2295):VFY:无法parsingexception类1373(Ljava / beans / IntrospectionException;)
 03-05 00:57:35.458:W / dalvikvm(2295):VFY:无法findaddr 0x4e处的exception处理程序
 03-05 00:57:35.458:W / dalvikvm(2295):VFY:拒绝Lcom / google / inject / internal / cglib / core / $ ReflectUtils; .getPropertiesHelper(Ljava / lang / Class; ZZ) PropertyDescriptor的;
 03-05 00:57:35.458:W / dalvikvm(2295):VFY:在0x004e拒绝操作码0x0d
 03-05 00:57:35.458:W / dalvikvm(2295):VFY:拒绝Lcom / google / inject / internal / cglib / core / $ ReflectUtils; .getPropertiesHelper(Ljava / lang / Class; ZZ) PropertyDescriptor的;
 03-05 00:57:35.458:W / dalvikvm(2295):validation器拒绝类Lcom / google / inject / internal / cglib / core / $ ReflectUtils;
 03-05 00:57:35.488:D / AndroidRuntime(2295):closures虚拟机
 03-05 00:57:35.498:W / dalvikvm(2295):threadid = 1:线程以未捕获的exception退出(group = 0x409c01f8)
 03-05 00:57:35.508:I / dalvikvm(2295):threadid = 3:对信号3做出反应
 03-05 00:57:35.548:I / dalvikvm(2295):将堆栈跟踪写入“/data/anr/traces.txt”
 03-05 00:57:35.568:E / AndroidRuntime(2295):致命例外:主
 03-05 00:57:35.568:E / AndroidRuntime(2295):java.lang.RuntimeException:无法启动活动ComponentInfo {za.co.mambo.cherrylist.android/za.co.mambo.cherrylist.android.CherryListActivity} :com.google.inject.internal.util。$ ComputationException:java.lang.VerifyError:com / google / inject / internal / cglib / core / $ ReflectUtils
 03-05 00:57:35.568:E / AndroidRuntime(2295):at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
 03-05 00:57:35.568:E / AndroidRuntime(2295):at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
 03-05 00:57:35.568:E / AndroidRuntime(2295):在android.app.ActivityThread.access $ 600(ActivityThread.java:123)
 03-05 00:57:35.568:E / AndroidRuntime(2295):at android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1147)
 03-05 00:57:35.568:E / AndroidRuntime(2295):at android.os.Handler.dispatchMessage(Handler.java:99)
 03-05 00:57:35.568:E / AndroidRuntime(2295):at android.os.Looper.loop(Looper.java:137)
 03-05 00:57:35.568:E / AndroidRuntime(2295):在android.app.ActivityThread.main(ActivityThread.java:4424)
 03-05 00:57:35.568:E / AndroidRuntime(2295):at java.lang.reflect.Method.invokeNative(Native Method)
 03-05 00:57:35.568:E / AndroidRuntime(2295):在java.lang.reflect.Method.invoke(Method.java:511)
 03-05 00:57:35.568:E / AndroidRuntime(2295):at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:784)
 03-05 00:57:35.568:E / AndroidRuntime(2295):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
 03-05 00:57:35.568:E / AndroidRuntime(2295):at dalvik.system.NativeStart.main(Native Method)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.util。$ ComputationException:java.lang.VerifyError:com / google / inject / internal / cglib / core / $ ReflectUtils
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.util。$ MapMaker $ StrategyImpl.compute(MapMaker.java:553)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.util。$ MapMaker $ StrategyImpl.compute(MapMaker.java:419)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.util。$ CustomConcurrentHashMap $ ComputingImpl.get(CustomConcurrentHashMap.java:2041)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.FailableCache.get(FailableCache.java:50)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.ConstructorInjectorStore.get(ConstructorInjectorStore.java:49)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:125)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.java:521)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:847)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:772)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:256)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:205)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:853)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.FactoryProxy.notify(FactoryProxy.java:46)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.ProcessedBindingData.runCreationListeners(ProcessedBindingData.java:50)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:133)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.Guice.createInjector(Guice.java:95)
 03-05 00:57:35.568:E / AndroidRuntime(2295):在com.google.inject.Guice.createInjector(Guice.java:72)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.Guice.createInjector(Guice.java:62)
 03-05 00:57:35.568:E / AndroidRuntime(2295):at za.co.mambo.cherrylist.android.CherryListActivity.onCreate(CherryListActivity.java:27)
 03-05 00:57:35.568:E / AndroidRuntime(2295):at android.app.Activity.performCreate(Activity.java:4465)
 03-05 00:57:35.568:E / AndroidRuntime(2295):at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
 03-05 00:57:35.568:E / AndroidRuntime(2295):at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
 03-05 00:57:35.568:E / AndroidRuntime(2295):... 11
 03-05 00:57:35.568:E / AndroidRuntime(2295):引起:java.lang.VerifyError:com / google / inject / internal / cglib / core / $ ReflectUtils
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.cglib.reflect。$ FastClassEmitter。(FastClassEmitter.java:67)
 03-05 00:57:35.568:E / AndroidRuntime(2295):at com.google.inject.internal.cglib.reflect。$ FastClass $ Generator.generateClass(FastClass.java:72)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.cglib.core。$ DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.cglib.core。$ AbstractClassGenerator.create(AbstractClassGenerator.java:216)
 03-05 00:57:35.568:E / AndroidRuntime(2295):at com.google.inject.internal.cglib.reflect。$ FastClass $ Generator.create(FastClass.java:64)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.BytecodeGen.newFastClass(BytecodeGen.java:207)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.DefaultConstructionProxyFactory.create(DefaultConstructionProxyFactory.java:53)
 03-05 00:57:35.568:E / AndroidRuntime(2295):com.google.inject.internal.ProxyFactory.create(ProxyFactory.java:153)
 03-05 00:57:35.568:E / AndroidRuntime(2295):在com.google.inject.internal
 03-05 00:57:36.178:I / dalvikvm(2295):threadid = 3:对信号3做出反应
 03-05 00:57:36.188:I / dalvikvm(2295):写栈跟踪为'/data/anr/traces.txt'
 03-05 00:57:36.530:I / dalvikvm(2295):threadid = 3:对信号3做出反应
 03-05 00:57:36.538:I / dalvikvm(2295):将堆栈跟踪写入“/data/anr/traces.txt”

Solutions Collecting From Web of "在Android Maven项目中使用Guice的VerrifyError"