Capacitor App - Barcode scanner issue

I want to use QRCode Scanner in my Capacitor Ionic 4 App, But non of the plugins are helpful.

Plugins Used -
import { BarcodeScanner } from ‘@ionic-native/barcode-scanner/ngx’;
import { QRScanner } from ‘@ionic-native/qr-scanner/ngx’;

BarcodeScanner throws error after running the app on Android Emulator, that variables are not declared.
QRScanner did not give any error, it installed successfully, and asked for the permission as well, but not able to open the camera to scan the code.

Any suggestions for this issue.

That’s all it says? “variables are not declared”?