Integrating the ZXing library directly into my Android application

后端 未结 17 1613
[愿得一人]
[愿得一人] 2020-11-22 04:35

I\'m writing this in mere desperation :) I\'ve been assigned to make a standalone barcode scanner (as a proof of concept) to an Android 1.6 phone.

For this i\'ve dis

17条回答
  •  遇见更好的自我
    2020-11-22 05:25

    Step by step to setup zxing 3.2.1 in eclipse

    1. Download zxing-master.zip from "https://github.com/zxing/zxing"
    2. Unzip zxing-master.zip, Use eclipse to import "android" project in zxing-master
    3. Download core-3.2.1.jar from "http://repo1.maven.org/maven2/com/google/zxing/core/3.2.1/"
    4. Create "libs" folder in "android" project and paste cor-3.2.1.jar into the libs folder
    5. Click on project: choose "properties" -> "Java Compiler" to change level to 1.7. Then click on "Android" change "Project build target" to android 4.4.2+, because using 1.7 requires compiling with Android 4.4
    6. If "CameraConfigurationUtils.java" don't exist in "zxing-master/android/app/src/main/java/com/google/zxing/client/android/camera/". You can copy it from "zxing-master/android-core/src/main/java/com/google/zxing/client/android/camera/" and paste to your project.
    7. Clean and build project. If your project show error about "switch - case", you should change them to "if - else".
    8. Completed. Clean and build project.
    9. Reference link: Using ZXing to create an android barcode scanning app

提交回复
热议问题