0

这是我在 StackOverflow 上的第一个问题。当我单击一个按钮时,我试图从我的应用程序启动一个 Zxing,但是我在 Eclipse 中的模拟器崩溃并出现了这个问题:


10-17 09:20:11.875: W/dalvikvm(512): VFY: unable to resolve static field 1452 (ISSUE_NUMBER) in Lcom/google/zxing/ResultMetadataType;
10-17 09:20:11.875: D/dalvikvm(512): VFY: replacing opcode 0x62 at 0x000d
10-17 09:20:11.875: D/dalvikvm(512): VFY: dead code 0x000f-001b in Lcom/google/zxing/client/android/CaptureActivity;. ()V
10-17 09:20:11.875: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:11.885: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/ResultPoint;)
10-17 09:20:11.895: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/ResultPoint;)
10-17 09:20:11.895: I/dalvikvm(512): Could not find method com.google.zxing.ResultPoint.getX, referenced from method com.google.zxing.client.android.CaptureActivity.drawLine
10-17 09:20:11.895: W/dalvikvm(512): VFY: unable to resolve virtual method 4146: Lcom/google/zxing/ResultPoint;.getX ()F
10-17 09:20:11.895: D/dalvikvm(512): VFY: replacing opcode 0x6e at 0x0000
10-17 09:20:11.895: D/dalvikvm(512): VFY: dead code 0x0003-0015 in Lcom/google/zxing/client/android/CaptureActivity;.drawLine (Landroid/graphics/Canvas;Landroid/graphics/Paint;Lcom/google/zxing/ResultPoint;Lcom/google/zxing/ResultPoint;)V
10-17 09:20:11.895: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:11.905: I/dalvikvm(512): Could not find method com.google.zxing.Result.getResultPoints, referenced from method com.google.zxing.client.android.CaptureActivity.drawResultPoints
10-17 09:20:11.905: W/dalvikvm(512): VFY: unable to resolve virtual method 4142: Lcom/google/zxing/Result;.getResultPoints ()[Lcom/google/zxing/ResultPoint;
10-17 09:20:11.905: D/dalvikvm(512): VFY: replacing opcode 0x6e at 0x0003
10-17 09:20:11.905: D/dalvikvm(512): VFY: dead code 0x0006-0099 in Lcom/google/zxing/client/android/CaptureActivity;.drawResultPoints (Landroid/graphics/Bitmap;Lcom/google/zxing/Result;)V
10-17 09:20:11.917: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:11.935: I/dalvikvm(512): Could not find method com.google.zxing.Result.toString, referenced from method com.google.zxing.client.android.CaptureActivity.handleDecodeExternally
10-17 09:20:11.935: W/dalvikvm(512): VFY: unable to resolve virtual method 4145: Lcom/google/zxing/Result;.toString ()Ljava/lang/String;
10-17 09:20:11.935: D/dalvikvm(512): VFY: replacing opcode 0x74 at 0x0053
10-17 09:20:11.935: D/dalvikvm(512): VFY: dead code 0x0056-00b8 in Lcom/google/zxing/client/android/CaptureActivity;.handleDecodeExternally (Lcom/google/zxing/Result;Lcom/google/zxing/client/android/result/ResultHandler;Landroid/graphics/Bitmap;)V
10-17 09:20:11.935: D/dalvikvm(512): VFY: dead code 0x00ba-00d4 in Lcom/google/zxing/client/android/CaptureActivity;.handleDecodeExternally (Lcom/google/zxing/Result;Lcom/google/zxing/client/android/result/ResultHandler;Landroid/graphics/Bitmap;)V
10-17 09:20:11.935: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:11.955: I/dalvikvm(512): Could not find method com.google.zxing.Result.getBarcodeFormat, referenced from method com.google.zxing.client.android.CaptureActivity.handleDecodeInternally
10-17 09:20:11.955: W/dalvikvm(512): VFY: unable to resolve virtual method 4139: Lcom/google/zxing/Result;.getBarcodeFormat ()Lcom/google/zxing/BarcodeFormat;
10-17 09:20:11.955: D/dalvikvm(512): VFY: replacing opcode 0x74 at 0x004a
10-17 09:20:11.955: D/dalvikvm(512): VFY: dead code 0x004d-01e1 in Lcom/google/zxing/client/android/CaptureActivity;.handleDecodeInternally (Lcom/google/zxing/Result;Lcom/google/zxing/client/android/result/ResultHandler;Landroid/graphics/Bitmap;)V
10-17 09:20:11.965: D/dalvikvm(512): VFY: dead code 0x01e9-0249 in Lcom/google/zxing/client/android/CaptureActivity;.handleDecodeInternally (Lcom/google/zxing/Result;Lcom/google/zxing/client/android/result/ResultHandler;Landroid/graphics/Bitmap;)V
10-17 09:20:11.965: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:11.985: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:12.005: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:12.005: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:12.015: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:12.015: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:12.015: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:12.025: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:12.036: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:12.036: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:12.036: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:12.086: W/dalvikvm(512): Exception Ljava/lang/NoClassDefFoundError; thrown during Lcom/google/zxing/client/android/CaptureActivity;.
10-17 09:20:12.086: W/dalvikvm(512): Class init failed in newInstance call (Lcom/google/zxing/client/android/CaptureActivity;)
10-17 09:20:12.105: D/AndroidRuntime(512): Shutting down VM
10-17 09:20:12.105: W/dalvikvm(512): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
10-17 09:20:12.115: E/AndroidRuntime(512): FATAL EXCEPTION: main
10-17 09:20:12.115: E/AndroidRuntime(512): java.lang.ExceptionInInitializerError
10-17 09:20:12.115: E/AndroidRuntime(512):  at java.lang.Class.newInstanceImpl(Native Method)
10-17 09:20:12.115: E/AndroidRuntime(512):  at java.lang.Class.newInstance(Class.java:1429)
10-17 09:20:12.115: E/AndroidRuntime(512):  at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
10-17 09:20:12.115: E/AndroidRuntime(512):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
10-17 09:20:12.115: E/AndroidRuntime(512):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
10-17 09:20:12.115: E/AndroidRuntime(512):  at android.app.ActivityThread.access$2300(ActivityThread.java:125)
10-17 09:20:12.115: E/AndroidRuntime(512):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
10-17 09:20:12.115: E/AndroidRuntime(512):  at android.os.Handler.dispatchMessage(Handler.java:99)
10-17 09:20:12.115: E/AndroidRuntime(512):  at android.os.Looper.loop(Looper.java:123)
10-17 09:20:12.115: E/AndroidRuntime(512):  at android.app.ActivityThread.main(ActivityThread.java:4627)
10-17 09:20:12.115: E/AndroidRuntime(512):  at java.lang.reflect.Method.invokeNative(Native Method)
10-17 09:20:12.115: E/AndroidRuntime(512):  at java.lang.reflect.Method.invoke(Method.java:521)
10-17 09:20:12.115: E/AndroidRuntime(512):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
10-17 09:20:12.115: E/AndroidRuntime(512):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
10-17 09:20:12.115: E/AndroidRuntime(512):  at dalvik.system.NativeStart.main(Native Method)
10-17 09:20:12.115: E/AndroidRuntime(512): Caused by: java.lang.NoClassDefFoundError: com.google.zxing.ResultMetadataType
10-17 09:20:12.115: E/AndroidRuntime(512):  at com.google.zxing.client.android.CaptureActivity.(CaptureActivity.java:110)
10-17 09:20:12.115: E/AndroidRuntime(512):  ... 15 more
10-17 09:20:11.875: W/dalvikvm(512): VFY: unable to resolve static field 1452 (ISSUE_NUMBER) in Lcom/google/zxing/ResultMetadataType;
10-17 09:20:11.875: D/dalvikvm(512): VFY: replacing opcode 0x62 at 0x000d
10-17 09:20:11.875: D/dalvikvm(512): VFY: dead code 0x000f-001b in Lcom/google/zxing/client/android/CaptureActivity;. ()V
10-17 09:20:11.875: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:11.885: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/ResultPoint;)
10-17 09:20:11.895: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/ResultPoint;)
10-17 09:20:11.895: I/dalvikvm(512): Could not find method com.google.zxing.ResultPoint.getX, referenced from method com.google.zxing.client.android.CaptureActivity.drawLine
10-17 09:20:11.895: W/dalvikvm(512): VFY: unable to resolve virtual method 4146: Lcom/google/zxing/ResultPoint;.getX ()F
10-17 09:20:11.895: D/dalvikvm(512): VFY: replacing opcode 0x6e at 0x0000
10-17 09:20:11.895: D/dalvikvm(512): VFY: dead code 0x0003-0015 in Lcom/google/zxing/client/android/CaptureActivity;.drawLine (Landroid/graphics/Canvas;Landroid/graphics/Paint;Lcom/google/zxing/ResultPoint;Lcom/google/zxing/ResultPoint;)V
10-17 09:20:11.895: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:11.905: I/dalvikvm(512): Could not find method com.google.zxing.Result.getResultPoints, referenced from method com.google.zxing.client.android.CaptureActivity.drawResultPoints
10-17 09:20:11.905: W/dalvikvm(512): VFY: unable to resolve virtual method 4142: Lcom/google/zxing/Result;.getResultPoints ()[Lcom/google/zxing/ResultPoint;
10-17 09:20:11.905: D/dalvikvm(512): VFY: replacing opcode 0x6e at 0x0003
10-17 09:20:11.905: D/dalvikvm(512): VFY: dead code 0x0006-0099 in Lcom/google/zxing/client/android/CaptureActivity;.drawResultPoints (Landroid/graphics/Bitmap;Lcom/google/zxing/Result;)V
10-17 09:20:11.917: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:11.935: I/dalvikvm(512): Could not find method com.google.zxing.Result.toString, referenced from method com.google.zxing.client.android.CaptureActivity.handleDecodeExternally
10-17 09:20:11.935: W/dalvikvm(512): VFY: unable to resolve virtual method 4145: Lcom/google/zxing/Result;.toString ()Ljava/lang/String;
10-17 09:20:11.935: D/dalvikvm(512): VFY: replacing opcode 0x74 at 0x0053
10-17 09:20:11.935: D/dalvikvm(512): VFY: dead code 0x0056-00b8 in Lcom/google/zxing/client/android/CaptureActivity;.handleDecodeExternally (Lcom/google/zxing/Result;Lcom/google/zxing/client/android/result/ResultHandler;Landroid/graphics/Bitmap;)V
10-17 09:20:11.935: D/dalvikvm(512): VFY: dead code 0x00ba-00d4 in Lcom/google/zxing/client/android/CaptureActivity;.handleDecodeExternally (Lcom/google/zxing/Result;Lcom/google/zxing/client/android/result/ResultHandler;Landroid/graphics/Bitmap;)V
10-17 09:20:11.935: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:11.955: I/dalvikvm(512): Could not find method com.google.zxing.Result.getBarcodeFormat, referenced from method com.google.zxing.client.android.CaptureActivity.handleDecodeInternally
10-17 09:20:11.955: W/dalvikvm(512): VFY: unable to resolve virtual method 4139: Lcom/google/zxing/Result;.getBarcodeFormat ()Lcom/google/zxing/BarcodeFormat;
10-17 09:20:11.955: D/dalvikvm(512): VFY: replacing opcode 0x74 at 0x004a
10-17 09:20:11.955: D/dalvikvm(512): VFY: dead code 0x004d-01e1 in Lcom/google/zxing/client/android/CaptureActivity;.handleDecodeInternally (Lcom/google/zxing/Result;Lcom/google/zxing/client/android/result/ResultHandler;Landroid/graphics/Bitmap;)V
10-17 09:20:11.965: D/dalvikvm(512): VFY: dead code 0x01e9-0249 in Lcom/google/zxing/client/android/CaptureActivity;.handleDecodeInternally (Lcom/google/zxing/Result;Lcom/google/zxing/client/android/result/ResultHandler;Landroid/graphics/Bitmap;)V
10-17 09:20:11.965: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:11.985: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:12.005: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:12.005: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:12.015: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:12.015: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:12.015: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:12.025: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:12.036: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:12.036: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:12.036: W/dalvikvm(512): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
10-17 09:20:12.086: W/dalvikvm(512): Exception Ljava/lang/NoClassDefFoundError; thrown during Lcom/google/zxing/client/android/CaptureActivity;.
10-17 09:20:12.086: W/dalvikvm(512): Class init failed in newInstance call (Lcom/google/zxing/client/android/CaptureActivity;)
10-17 09:20:12.105: D/AndroidRuntime(512): Shutting down VM
10-17 09:20:12.105: W/dalvikvm(512): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
10-17 09:20:12.115: E/AndroidRuntime(512): FATAL EXCEPTION: main
10-17 09:20:12.115: E/AndroidRuntime(512): java.lang.ExceptionInInitializerError
10-17 09:20:12.115: E/AndroidRuntime(512):  at java.lang.Class.newInstanceImpl(Native Method)
10-17 09:20:12.115: E/AndroidRuntime(512):  at java.lang.Class.newInstance(Class.java:1429)
10-17 09:20:12.115: E/AndroidRuntime(512):  at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
10-17 09:20:12.115: E/AndroidRuntime(512):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
10-17 09:20:12.115: E/AndroidRuntime(512):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
10-17 09:20:12.115: E/AndroidRuntime(512):  at android.app.ActivityThread.access$2300(ActivityThread.java:125)
10-17 09:20:12.115: E/AndroidRuntime(512):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
10-17 09:20:12.115: E/AndroidRuntime(512):  at android.os.Handler.dispatchMessage(Handler.java:99)
10-17 09:20:12.115: E/AndroidRuntime(512):  at android.os.Looper.loop(Looper.java:123)
10-17 09:20:12.115: E/AndroidRuntime(512):  at android.app.ActivityThread.main(ActivityThread.java:4627)
10-17 09:20:12.115: E/AndroidRuntime(512):  at java.lang.reflect.Method.invokeNative(Native Method)
10-17 09:20:12.115: E/AndroidRuntime(512):  at java.lang.reflect.Method.invoke(Method.java:521)
10-17 09:20:12.115: E/AndroidRuntime(512):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
10-17 09:20:12.115: E/AndroidRuntime(512):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
10-17 09:20:12.115: E/AndroidRuntime(512):  at dalvik.system.NativeStart.main(Native Method)
10-17 09:20:12.115: E/AndroidRuntime(512): Caused by: java.lang.NoClassDefFoundError: com.google.zxing.ResultMetadataType
10-17 09:20:12.115: E/AndroidRuntime(512):  at com.google.zxing.client.android.CaptureActivity.(CaptureActivity.java:110)
10-17 09:20:12.115: E/AndroidRuntime(512):  ... 15 more

很抱歉,我无法正确显示 logcat。我刚刚复制了一个 .txt 文件。

有谁知道可能是哪个问题?

非常感谢!!!

4

1 回答 1

2

该错误几乎说明了一切:您引用的所有类实际上都没有在您的应用程序中找到。你真的core.jar在你的 .apk 中构建了吗?这说明你没有。包含 .jars 的最简单方法是将它们添加到您的libs/文件夹中。

于 2013-10-17T12:27:44.473 回答