Ionic BarcodeScanner and QRScanner duplicated with element declared at AndroidManifest.xml

Hi, I am trying to import the barcodescanner and qrscanner plugin on my application but it seems that there is a conflict on the declarations in the manifest. How do I resolve this? I tried removing the declaration of the duplicated element but more error comes out

I had similar issue when tried to use cordova-plugin-qrscanner and cordova-camera-preview.
What helped me was to:

  1. Go to cordova-plugin-qrscanner->plugin.xml
  2. comment out or remove content of the section
    <config-file target="AndroidManifest.xml" parent="/*">
  3. in console run:
    ionic cordova platform remove android
  4. in console run:
    ionic cordova platform add android

Hope it helps.