Vamsi Challa
Vamsi Challa

Reputation: 11109

ZXing-2.1 - Missing libraries

EDIT ::: For people who may be searching for a solution, Here it is.. (using ZXing 2.1)

Follow the steps below :::

  1. First you have to import the existing code into your workspace

    File -> import -> android -> existing android code into workspace

  2. Browse to the unzipped folder of ZXing 2.1

  3. You will have two projects in the list. Select both and click OK.

  4. They will be imported into your workspace and you will have errors.

  5. For the first Project (CaptureActivity in my case), you have to add the core.jar file present in ZXing2.1\zxing2.1\core

  6. For the second project (ZXingTestActivity in my case), you have to add the core.jar file present in ZXing2.1\zxing2.1\core and android-integration.jar present in ZXing2.1\zxing2.1\android-integration

  7. That's it.. You are done...

Hope this helps...


I have an application where we use ZXing. I have to update the library to the latest one. So I downloaded the code from ZXing-2.1.zip from here. When I try to compile I get errors in the import statements.

import com.google.zxing.BarcodeFormat;
import com.google.zxing.DecodeHintType;
import com.google.zxing.Result;

I couldn't find these libraries anywhere in the zip that I have downloaded. Can someone please guide me on how this is done? What am I doing wrong?

If you have a step by step tutorial, please do link them.

Upvotes: 1

Views: 4957

Answers (2)

Sean Owen
Sean Owen

Reputation: 66866

The classes are found in core.jar. You build this from the source code you downloaded.

I suggest you use the latest code from Subversion actually. If you do that, here's how you can get a pre-compiled JAR, or build one yourself: https://code.google.com/p/zxing/wiki/GettingStarted

(We are releasing 2.2 in a week or two by the way.)

Or if you want to build 2.1, see this previous documentation: https://code.google.com/p/zxing/source/browse/wiki/GettingStarted.wiki?spec=svn2659&r=2659

Upvotes: 2

stackoverflow
stackoverflow

Reputation: 2370

Extract zip

Right click on project-> properties-> Java Build Path-> Libraries-> Add External Jars-> select the jar file where it is in your Pc-> click ok.

Upvotes: 0

Related Questions