我正在尝试做类似于this post的事情。但是当我尝试它时会引发一个致命的例外。
03-06 16:48:23.421: W/dalvikvm(2300): VFY: unable to resolve exception class 748 (Lcom/google/zxing/ChecksumException;)
03-06 16:48:23.421: W/dalvikvm(2300): VFY: unable to find exception handler at addr 0xc
03-06 16:48:23.421: W/dalvikvm(2300): VFY: rejected Lcom/example/pfc/MainActivity;.onCameraFrame (Lorg/opencv/android/CameraBridgeViewBase$CvCameraViewFrame;)Lorg/opencv/core/Mat;
03-06 16:48:23.421: W/dalvikvm(2300): VFY: rejecting opcode 0x0d at 0x000c
03-06 16:48:23.421: W/dalvikvm(2300): VFY: rejected Lcom/example/pfc/MainActivity;.onCameraFrame (Lorg/opencv/android/CameraBridgeViewBase$CvCameraViewFrame;)Lorg/opencv/core/Mat;
03-06 16:48:23.421: W/dalvikvm(2300): Verifier rejected class Lcom/example/pfc/MainActivity;
03-06 16:48:23.421: W/dalvikvm(2300): Class init failed in newInstance call (Lcom/example/pfc/MainActivity;)
03-06 16:48:23.421: W/dalvikvm(2300): threadid=1: thread exiting with uncaught exception (group=0x416efd40)
03-06 16:48:23.424: E/AndroidRuntime(2300): FATAL EXCEPTION: main
03-06 16:48:23.424: E/AndroidRuntime(2300): Process: com.example.pfc, PID: 2300
03-06 16:48:23.424: E/AndroidRuntime(2300): java.lang.VerifyError: com/example/pfc/MainActivity
03-06 16:48:23.424: E/AndroidRuntime(2300): at java.lang.Class.newInstanceImpl(Native Method)
03-06 16:48:23.424: E/AndroidRuntime(2300): at java.lang.Class.newInstance(Class.java:1208)
03-06 16:48:23.424: E/AndroidRuntime(2300): at android.app.Instrumentation.newActivity(Instrumentation.java:1084)
03-06 16:48:23.424: E/AndroidRuntime(2300): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2126)
03-06 16:48:23.424: E/AndroidRuntime(2300): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2269)
03-06 16:48:23.424: E/AndroidRuntime(2300): at android.app.ActivityThread.access$800(ActivityThread.java:139)
03-06 16:48:23.424: E/AndroidRuntime(2300): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
03-06 16:48:23.424: E/AndroidRuntime(2300): at android.os.Handler.dispatchMessage(Handler.java:102)
03-06 16:48:23.424: E/AndroidRuntime(2300): at android.os.Looper.loop(Looper.java:136)
03-06 16:48:23.424: E/AndroidRuntime(2300): at android.app.ActivityThread.main(ActivityThread.java:5102)
03-06 16:48:23.424: E/AndroidRuntime(2300): at java.lang.reflect.Method.invokeNative(Native Method)
03-06 16:48:23.424: E/AndroidRuntime(2300): at java.lang.reflect.Method.invoke(Method.java:515)
03-06 16:48:23.424: E/AndroidRuntime(2300): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
03-06 16:48:23.424: E/AndroidRuntime(2300): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
03-06 16:48:23.424: E/AndroidRuntime(2300): at dalvik.system.NativeStart.main(Native Method)
我虽然是因为最小的SDK版本,但没有...我也知道问题出在 onCameraFrame ,因为当我评论try / catch时,我可以运行该应用程序。有任何想法吗? 感谢。
答案 0 :(得分:0)
解决了, core.jar 必须在Libs文件夹中......