Odd ZXing Decoder Error

CamCam
edited December 9 in Android Mode

I am currently writing an application for Android that uses the ZXing library to encode/decode QR codes. I have tried all versions of ZXing from 3.3.1 to 1.9 to see if this error would go away, but it has not. There seems to be no questions asked regarding this on these forums or elsewhere online, and nothing in the ZXing documentation seem to reference this, either.

The error in question is "The function "decode()" expects paramaters like: "decode(MonochromeBitmapSource)"" despite both the code I am trying out (https://gist.github.com/darkwave/43352f775e6f767a11cb) and the ZXing documentation for the decoder (https://zxing.github.io/zxing/apidocs/com/google/zxing/Reader.html / https://zxing.github.io/zxing/apidocs/com/google/zxing/MultiFormatReader.html) requiring a BinaryBitmap to function, not a MonochromeBitmapSource like Processing is demanding. Something more bizarre is the fact the documentation doesn't even have a page for MonochromeBitmapSource.

Are there any potential workarounds people have made for this? I'd prefer a solution that doesn't require the Java AWT libraries, which most solutions I have come across for QR code decoding in Android require.

Tagged:

Answers

  • CamCam
    edited December 9 Answer ✓

    Figured the issue out. I have the ZXING4P library installed and it was going off that instead of the ZXing jar I have in my "code" folder. Quick note: Code won't compile if you have both the ZXING4P and the ZXing libraries.

Sign In or Register to comment.