Skip to content Skip to sidebar Skip to footer

Android Zxing Captureactivity Npe On Viewfinderview

I've integrated the zxing library into my app. I have a runtime error when i try to scan a QR code. It's caused by a NPE when trying to inflate a ViewFinderView object from XML. In

Solution 1:

You've copied the project's UI including CaptureActivity and ViewfinderView. Don't do that -- it's not OK and not wholly permitted. You need to write your own app and reuse parts that you understand, into an app that you understand. Here indeed you pasted a bunch of code incompletely, and it doesn't work when you do that.

Integrate by Intent, or write your own app. In any event please do not use com.google.zxing.client.android like this.

Post a Comment for "Android Zxing Captureactivity Npe On Viewfinderview"