I'm trying to implement google's barcode scanner within my application.
The following code calls the barcode activity:
public void onClick(View v) {
    if (v.getId() == R.id.read_barcode) {
        Intent intent = new Intent(this, BarcodeCaptureActivity.class);
        intent.putExtra(BarcodeCaptureActivity.AutoFocus, autoFocus.isChecked());
        intent.putExtra(BarcodeCaptureActivity.UseFlash, useFlash.isChecked());
        startActivityForResult(intent, RC_BARCODE_CAPTURE);
    }
}
It then jumps to this part of the Activity.java code:
It throws the flag Source code does not match byte code and returns to the calling function where it then crashes with an InflationException that points to an XML file.
On further inspection, many of the imports are red:
As a result, there are many error flags on Activity.java. The code still compiles and runs up until the OnClick method is hit. I have tried following this and this on SO to no success. TIA

