0

我正在尝试安装 ZXing QR 捕获应用程序进行测试,但出现错误:

07-26 20:15:22.667: E/AndroidRuntime(29355): FATAL EXCEPTION: main
07-26 20:15:22.667: E/AndroidRuntime(29355): java.lang.ExceptionInInitializerError
07-26 20:15:22.667: E/AndroidRuntime(29355):    at java.lang.Class.newInstanceImpl(Native Method)
07-26 20:15:22.667: E/AndroidRuntime(29355):    at java.lang.Class.newInstance(Class.java:1319)
07-26 20:15:22.667: E/AndroidRuntime(29355):    at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
07-26 20:15:22.667: E/AndroidRuntime(29355):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1882)
07-26 20:15:22.667: E/AndroidRuntime(29355):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
07-26 20:15:22.667: E/AndroidRuntime(29355):    at android.app.ActivityThread.access$600(ActivityThread.java:127)
07-26 20:15:22.667: E/AndroidRuntime(29355):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
07-26 20:15:22.667: E/AndroidRuntime(29355):    at android.os.Handler.dispatchMessage(Handler.java:99)
07-26 20:15:22.667: E/AndroidRuntime(29355):    at android.os.Looper.loop(Looper.java:137)
07-26 20:15:22.667: E/AndroidRuntime(29355):    at android.app.ActivityThread.main(ActivityThread.java:4441)
07-26 20:15:22.667: E/AndroidRuntime(29355):    at java.lang.reflect.Method.invokeNative(Native Method)
07-26 20:15:22.667: E/AndroidRuntime(29355):    at java.lang.reflect.Method.invoke(Method.java:511)
07-26 20:15:22.667: E/AndroidRuntime(29355):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-26 20:15:22.667: E/AndroidRuntime(29355):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-26 20:15:22.667: E/AndroidRuntime(29355):    at dalvik.system.NativeStart.main(Native Method)
07-26 20:15:22.667: E/AndroidRuntime(29355): Caused by: java.lang.NoClassDefFoundError: com.google.zxing.ResultMetadataType
07-26 20:15:22.667: E/AndroidRuntime(29355):    at com.google.zxing.client.android.CaptureActivity.<clinit>(CaptureActivity.java:107)
07-26 20:15:22.667: E/AndroidRuntime(29355):    ... 15 more

有什么想法?

4

2 回答 2

1

您正在尝试使用core/库中的代码,但没有将其放入您的应用程序中。但是,您甚至不需要此代码。这是迄今为止添加扫描的最简单方法:http ://code.google.com/p/zxing/wiki/ScanningViaIntent

于 2012-07-26T19:48:42.650 回答
0

com.google.zxing.ResultMetadataType 类是否在您的构建路径中?

于 2012-07-26T19:39:00.137 回答