运行项目时ZXing错误

时间:2013-03-09 07:19:35

标签: android zxing

我从

下载了ZXing源代码

https://code.google.com/p/zxing/downloads/detail?name=ZXing-2.1.zip&can=2&q=

我将其作为具有现有源的Android应用程序导入,使用Apache ant构建core.java并将其作为外部jar文件添加到项目中。我试着在手机上运行应用程序。它意外停止并给了我以下错误:

03-09 12:36:01.882: E/AndroidRuntime(5941): FATAL EXCEPTION: main
03-09 12:36:01.882: E/AndroidRuntime(5941): java.lang.ExceptionInInitializerError
03-09 12:36:01.882: E/AndroidRuntime(5941):     at java.lang.Class.newInstanceImpl(Native Method)
03-09 12:36:01.882: E/AndroidRuntime(5941):     at java.lang.Class.newInstance(Class.java:1319)
03-09 12:36:01.882: E/AndroidRuntime(5941):     at android.app.Instrumentation.newActivity(Instrumentation.java:1027)
03-09 12:36:01.882: E/AndroidRuntime(5941):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1885)
03-09 12:36:01.882: E/AndroidRuntime(5941):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995)
03-09 12:36:01.882: E/AndroidRuntime(5941):     at android.app.ActivityThread.access$600(ActivityThread.java:128)
03-09 12:36:01.882: E/AndroidRuntime(5941):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161)
03-09 12:36:01.882: E/AndroidRuntime(5941):     at android.os.Handler.dispatchMessage(Handler.java:99)
03-09 12:36:01.882: E/AndroidRuntime(5941):     at android.os.Looper.loop(Looper.java:137)
03-09 12:36:01.882: E/AndroidRuntime(5941):     at android.app.ActivityThread.main(ActivityThread.java:4517)
03-09 12:36:01.882: E/AndroidRuntime(5941):     at java.lang.reflect.Method.invokeNative(Native Method)
03-09 12:36:01.882: E/AndroidRuntime(5941):     at java.lang.reflect.Method.invoke(Method.java:511)
03-09 12:36:01.882: E/AndroidRuntime(5941):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)
03-09 12:36:01.882: E/AndroidRuntime(5941):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
03-09 12:36:01.882: E/AndroidRuntime(5941):     at dalvik.system.NativeStart.main(Native Method)
03-09 12:36:01.882: E/AndroidRuntime(5941): Caused by: java.lang.NoClassDefFoundError: com.google.zxing.ResultMetadataType
03-09 12:36:01.882: E/AndroidRuntime(5941):     at com.google.zxing.client.android.CaptureActivity.<clinit>(CaptureActivity.java:101)
03-09 12:36:01.882: E/AndroidRuntime(5941):     ... 15 more

有人可以告诉我错误在哪里吗?

0 个答案:

没有答案