Integrate ZXing QR code scanner without installing BarCode Scanner

后端 未结 7 1479
忘掉有多难
忘掉有多难 2020-12-02 13:39

I am trying to Integrate ZXing QR Code into my android app without installing BarCode Scanner app, I have followed the steps as:

1) Firstly I have downloaded ZXing.z

7条回答
  •  抹茶落季
    2020-12-02 14:02

    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. You can click on "Proprties" > "Android" > click on "Is Libraries" to use for your project

提交回复
热议问题