I'm trying to use the barcode scanner plugin for PhoneGap. I've followed the instructions in the readme, but the PhoneGap app simply crashes when I call window.plugins.barcodeScanner.scan()
:
E/AndroidRuntime(15842): java.lang.RuntimeException: Unable to instantiate
activity ComponentInfo{mypackage/com.google.zxing.client.android.CaptureActivity}:
java.lang.ClassNotFoundException: com.google.zxing.client.android.CaptureActivity
I suspect this has something to do with the fact that after I add a reference to the plugin's LibraryProject, it doesn't actually stick. When I go to my project's properties, Android, I can add a reference to the BarcodeScanner\LibraryProject:
But after I click Apply and OK and then reopen the project's properties, the reference has a red X:
What's going on here?
I ended up just calling out to the installed Barcode Scanner app rather than trying to include the code as a part of my project.