这是我在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文件。
有人知道哪个可能是问题吗?
非常感谢!!!
答案 0 :(得分:2)
错误几乎说明了一切:您实际上在您的应用中找不到您引用的类。你真的在你的.apk中构建了core.jar
吗?这说你没有。包含.jars的最简单方法是将它们添加到libs/
文件夹中。