2012-08-29 590 views
0

我從http://code.google.com/p/zxing/source/browse/trunk下載了完整的源代碼並將其構建到Android的apk文件中,但沒有任何Eclipse問題,但是在將apk安裝到我的手機後,它不起作用,而是顯示:「應用程序條碼掃描器(com.google.zxing.client.android進程)意外停止,請重試」來自com.google.zxing.client.android的應用程序的源代碼不起作用

我錯過了什麼嗎?在此先感謝

這裏是logcat的:(對不起太長)

08-29 09:45:48.797: E/Trace(652): error opening trace file: No such file or directory (2) 
08-29 09:45:49.027: W/dalvikvm(652): VFY: unable to resolve static field 56 (ISSUE_NUMBER) in Lcom/google/zxing/ResultMetadataType; 
08-29 09:45:49.027: D/dalvikvm(652): VFY: replacing opcode 0x62 at 0x0017 
08-29 09:45:49.048: W/dalvikvm(652): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;) 
08-29 09:45:49.077: W/dalvikvm(652): VFY: unable to find class referenced in signature (Lcom/google/zxing/ResultPoint;) 
08-29 09:45:49.077: W/dalvikvm(652): VFY: unable to find class referenced in signature (Lcom/google/zxing/ResultPoint;) 
08-29 09:45:49.087: I/dalvikvm(652): Could not find method com.google.zxing.ResultPoint.getX, referenced from method com.google.zxing.client.android.CaptureActivity.drawLine 
08-29 09:45:49.097: W/dalvikvm(652): VFY: unable to resolve virtual method 329: Lcom/google/zxing/ResultPoint;.getX()F 
08-29 09:45:49.097: D/dalvikvm(652): VFY: replacing opcode 0x6e at 0x0000 
08-29 09:45:49.097: W/dalvikvm(652): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;) 
08-29 09:45:49.107: I/dalvikvm(652): Could not find method com.google.zxing.Result.getResultPoints, referenced from method com.google.zxing.client.android.CaptureActivity.drawResultPoints 
08-29 09:45:49.117: W/dalvikvm(652): VFY: unable to resolve virtual method 325: Lcom/google/zxing/Result;.getResultPoints()[Lcom/google/zxing/ResultPoint; 
08-29 09:45:49.117: D/dalvikvm(652): VFY: replacing opcode 0x6e at 0x0003 
08-29 09:45:49.127: W/dalvikvm(652): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;) 
08-29 09:45:49.157: I/dalvikvm(652): Could not find method com.google.zxing.Result.toString, referenced from method com.google.zxing.client.android.CaptureActivity.handleDecodeExternally 
08-29 09:45:49.157: W/dalvikvm(652): VFY: unable to resolve virtual method 328: Lcom/google/zxing/Result;.toString()Ljava/lang/String; 
08-29 09:45:49.167: D/dalvikvm(652): VFY: replacing opcode 0x74 at 0x0057 
08-29 09:45:49.167: I/dalvikvm(652): Could not find method com.google.zxing.Result.getText, referenced from method com.google.zxing.client.android.CaptureActivity.handleDecodeExternally 
08-29 09:45:49.177: W/dalvikvm(652): VFY: unable to resolve virtual method 326: Lcom/google/zxing/Result;.getText()Ljava/lang/String; 
08-29 09:45:49.177: D/dalvikvm(652): VFY: replacing opcode 0x74 at 0x014d 
08-29 09:45:49.187: W/dalvikvm(652): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;) 
08-29 09:45:49.207: I/dalvikvm(652): Could not find method com.google.zxing.Result.getBarcodeFormat, referenced from method com.google.zxing.client.android.CaptureActivity.handleDecodeInternally 
08-29 09:45:49.207: W/dalvikvm(652): VFY: unable to resolve virtual method 322: Lcom/google/zxing/Result;.getBarcodeFormat()Lcom/google/zxing/BarcodeFormat; 
08-29 09:45:49.207: D/dalvikvm(652): VFY: replacing opcode 0x74 at 0x004c 
08-29 09:45:49.247: W/dalvikvm(652): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;) 
08-29 09:45:49.277: W/dalvikvm(652): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;) 
08-29 09:45:49.277: W/dalvikvm(652): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;) 
08-29 09:45:49.287: W/dalvikvm(652): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;) 
08-29 09:45:49.297: W/dalvikvm(652): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;) 
08-29 09:45:49.307: W/dalvikvm(652): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;) 
08-29 09:45:49.307: W/dalvikvm(652): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;) 
08-29 09:45:49.317: W/dalvikvm(652): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;) 
08-29 09:45:49.328: I/dalvikvm(652): Could not find method com.google.zxing.Result.getText, referenced from method com.google.zxing.client.android.CaptureActivity.handleDecode 
08-29 09:45:49.328: W/dalvikvm(652): VFY: unable to resolve virtual method 326: Lcom/google/zxing/Result;.getText()Ljava/lang/String; 
08-29 09:45:49.328: D/dalvikvm(652): VFY: replacing opcode 0x6e at 0x0061 
08-29 09:45:49.337: W/dalvikvm(652): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;) 
08-29 09:45:49.349: W/dalvikvm(652): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;) 
08-29 09:45:49.349: W/dalvikvm(652): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;) 
08-29 09:45:49.397: W/dalvikvm(652): Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lcom/google/zxing/client/android/CaptureActivity; 
08-29 09:45:49.397: W/dalvikvm(652): Class init failed in newInstance call (Lcom/google/zxing/client/android/CaptureActivity;) 
08-29 09:45:49.397: D/AndroidRuntime(652): Shutting down VM 
08-29 09:45:49.407: W/dalvikvm(652): threadid=1: thread exiting with uncaught exception (group=0x40a13300) 
08-29 09:45:49.439: E/AndroidRuntime(652): FATAL EXCEPTION: main 
08-29 09:45:49.439: E/AndroidRuntime(652): java.lang.ExceptionInInitializerError 
08-29 09:45:49.439: E/AndroidRuntime(652): at java.lang.Class.newInstanceImpl(Native Method) 
08-29 09:45:49.439: E/AndroidRuntime(652): at java.lang.Class.newInstance(Class.java:1319) 
08-29 09:45:49.439: E/AndroidRuntime(652): at android.app.Instrumentation.newActivity(Instrumentation.java:1053) 
08-29 09:45:49.439: E/AndroidRuntime(652): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974) 
08-29 09:45:49.439: E/AndroidRuntime(652): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084) 
08-29 09:45:49.439: E/AndroidRuntime(652): at android.app.ActivityThread.access$600(ActivityThread.java:130) 
08-29 09:45:49.439: E/AndroidRuntime(652): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195) 
08-29 09:45:49.439: E/AndroidRuntime(652): at android.os.Handler.dispatchMessage(Handler.java:99) 
08-29 09:45:49.439: E/AndroidRuntime(652): at android.os.Looper.loop(Looper.java:137) 
08-29 09:45:49.439: E/AndroidRuntime(652): at android.app.ActivityThread.main(ActivityThread.java:4745) 
08-29 09:45:49.439: E/AndroidRuntime(652): at java.lang.reflect.Method.invokeNative(Native Method) 
08-29 09:45:49.439: E/AndroidRuntime(652): at java.lang.reflect.Method.invoke(Method.java:511) 
08-29 09:45:49.439: E/AndroidRuntime(652): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) 
08-29 09:45:49.439: E/AndroidRuntime(652): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 
08-29 09:45:49.439: E/AndroidRuntime(652): at dalvik.system.NativeStart.main(Native Method) 
08-29 09:45:49.439: E/AndroidRuntime(652): Caused by: java.lang.NoClassDefFoundError: com.google.zxing.ResultMetadataType 
08-29 09:45:49.439: E/AndroidRuntime(652): at com.google.zxing.client.android.CaptureActivity.<clinit>(CaptureActivity.java:103) 
08-29 09:45:49.439: E/AndroidRuntime(652): ... 15 more 
+0

它崩潰的原因應該在LogCat中。你可以嘗試在那裏看看,給出原因嗎? – Muz

回答

1

這當然沒有問題:https://play.google.com/store/apps/details?id=com.google.zxing.client.android

你要麼修改應用程序,而導致崩潰,或者您正在安裝在無法通過手動側載運行應用程序的設備上。

如果不提供所有最重要的信息,您將不會得到任何進一步的幫助:堆棧跟蹤!

+0

是的,https://play.google.com/store/apps/details?id=com.google.zxing.client.android工作,甚至是我從http://code.google.com/p/下載的apk zxing/source/browse/trunk可以工作,但是我從源代碼構建的apk不起作用,我沒有更改任何代碼,只需按照以下說明操作即可: – user1632048

+0

這裏是我所做的:1.創建一個新的android項目現有代碼:即,我從code.google.com/p/zxing/browse/trunk下載的源代碼; 2.用apache構建core.jar並將其作爲外部jar添加到從1獲得的項目中; 3.從項目中創建apk 1.我在我的問題中描述的真實設備上的仿真器上得到了相同的結果。 – user1632048

+0

然後你沒有建立我們的項目,因爲你說它的工作。我們的項目有一個基於Ant的構建。您使用項目代碼的一些子集創建了一些新項目。它「不起作用」,你什麼都沒有說錯誤是什麼。 –

相關問題