所以我想實現一個進入我的應用程序,但問題是,它不會作爲一個單獨的應用程序工作,所以它粉碎evrytime我啓動它。我按照教程http://damianflannery.wordpress.com/2011/06/13/integrate-zxing-barcode-scanner-into-your-android-app-natively-using-eclipse/的方法做了evry事情,但是它不知如何起作用。所以我tryied啓動captureActivity作爲應用程序,而不是庫,並且當它試圖這樣做,它崩潰的開始:實施斑馬線,2.0到我的Android應用
private static final Set<ResultMetadataType> DISPLAYABLE_METADATA_TYPES =
EnumSet.of(ResultMetadataType.ISSUE_NUMBER,
ResultMetadataType.SUGGESTED_PRICE,
ResultMetadataType.ERROR_CORRECTION_LEVEL,
ResultMetadataType.POSSIBLE_COUNTRY);
這導致我沒編譯core.jar添加正確的問題。但是我不明白我會在哪裏犯錯誤。我在覈心目錄中運行ant -f,它給了我core.jar。任何想法我可以做什麼?
編輯:logcat的:
01-06 02:07:08.280: E/AndroidRuntime(1629): FATAL EXCEPTION: main
01-06 02:07:08.280: E/AndroidRuntime(1629): java.lang.ExceptionInInitializerError
01-06 02:07:08.280: E/AndroidRuntime(1629): at java.lang.Class.newInstanceImpl(Native Method)
01-06 02:07:08.280: E/AndroidRuntime(1629): at java.lang.Class.newInstance(Class.java:1409)
01-06 02:07:08.280: E/AndroidRuntime(1629): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
01-06 02:07:08.280: E/AndroidRuntime(1629): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
01-06 02:07:08.280: E/AndroidRuntime(1629): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
01-06 02:07:08.280: E/AndroidRuntime(1629): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
01-06 02:07:08.280: E/AndroidRuntime(1629): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
01-06 02:07:08.280: E/AndroidRuntime(1629): at android.os.Handler.dispatchMessage(Handler.java:99)
01-06 02:07:08.280: E/AndroidRuntime(1629): at android.os.Looper.loop(Looper.java:130)
01-06 02:07:08.280: E/AndroidRuntime(1629): at android.app.ActivityThread.main(ActivityThread.java:3683)
01-06 02:07:08.280: E/AndroidRuntime(1629): at java.lang.reflect.Method.invokeNative(Native Method)
01-06 02:07:08.280: E/AndroidRuntime(1629): at java.lang.reflect.Method.invoke(Method.java:507)
01-06 02:07:08.280: E/AndroidRuntime(1629): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
01-06 02:07:08.280: E/AndroidRuntime(1629): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
01-06 02:07:08.280: E/AndroidRuntime(1629): at dalvik.system.NativeStart.main(Native Method)
01-06 02:07:08.280: E/AndroidRuntime(1629): Caused by: java.lang.NoClassDefFoundError: com.google.zxing.ResultMetadataType
01-06 02:07:08.280: E/AndroidRuntime(1629): at com.google.zxing.client.android.CaptureActivity.<clinit>(CaptureActivity.java:107)
01-06 02:07:08.280: E/AndroidRuntime(1629): ... 15 more
01-06 02:07:08.740: E/GoKeyboard(1442): error setSuggestions isNotInput()!
01-06 02:07:09.140: E/GoKeyboard(1442): error setSuggestions isNotInput()!
01-06 02:07:11.600: E/GoKeyboard(1442): error setSuggestions isNotInput()!
01-06 02:07:11.600: E/GoKeyboard(1442): error setSuggestions isNotInput()!
現在,我從這裏下載http://mvnrepository.com/artifact/com.google.zxing/core/2.0的核心,並用它來偷同樣的錯誤,所以它必須是別的東西......
你有安裝在您的手機條形碼掃描儀應用?] – Syn3sthete
我沒有以前有它,但是當我啓動應用程序進行安裝條碼掃描儀,但是當我啓動它,它崩潰。 – gabrjan
有人有什麼想法? – gabrjan