我按照此链接中的所有说明操作:http://www.jmanzano.esblog/?p=244#comment-2175。但是,当我点击Button
中的Activity
时,它无效(强制关闭)。
在log-cat中显示以下错误:
8-21 11:59:25.895: E/AndroidRuntime(909): FATAL EXCEPTION: main
08-21 11:59:25.895: E/AndroidRuntime(909): java.lang.ExceptionInInitializerError
08-21 11:59:25.895: E/AndroidRuntime(909): at java.lang.Class.newInstanceImpl(Native Method)
08-21 11:59:25.895: E/AndroidRuntime(909): at java.lang.Class.newInstance(Class.java:1409)
08-21 11:59:25.895: E/AndroidRuntime(909): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
08-21 11:59:25.895: E/AndroidRuntime(909): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
08-21 11:59:25.895: E/AndroidRuntime(909): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
08-21 11:59:25.895: E/AndroidRuntime(909): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
08-21 11:59:25.895: E/AndroidRuntime(909): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
08-21 11:59:25.895: E/AndroidRuntime(909): at android.os.Handler.dispatchMessage(Handler.java:99)
08-21 11:59:25.895: E/AndroidRuntime(909): at android.os.Looper.loop(Looper.java:123)
08-21 11:59:25.895: E/AndroidRuntime(909): at android.app.ActivityThread.main(ActivityThread.java:3683)
08-21 11:59:25.895: E/AndroidRuntime(909): at java.lang.reflect.Method.invokeNative(Native Method)
08-21 11:59:25.895: E/AndroidRuntime(909): at java.lang.reflect.Method.invoke(Method.java:507)
08-21 11:59:25.895: E/AndroidRuntime(909): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
08-21 11:59:25.895: E/AndroidRuntime(909): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
08-21 11:59:25.895: E/AndroidRuntime(909): at dalvik.system.NativeStart.main(Native Method)
08-21 11:59:25.895: E/AndroidRuntime(909): Caused by: java.lang.NoClassDefFoundError: com.google.zxing.ResultMetadataType
08-21 11:59:25.895: E/AndroidRuntime(909): at com.google.zxing.client.android.CaptureActivity.<clinit>(CaptureActivity.java:108)
08-21 11:59:25.895: E/AndroidRuntime(909): ... 15 more