To Read QR code scanner I install "cordova-barcodescanner-plugin" plugin from the command prompt. Installation is successful but when tried build it for android it giving me error as below:
"The value of the attribute "prefix="xmlns",localpart="android",rawname="xmlns:android"" is invalid. Prefixed namespace bindings may not be empty."
I tried a lot debugging it but could not. After googling found that different version of the plugin will work then I did below steps to overcome plugin issue:
1. First, you need to uninstall it by using the command:
> Cordova plugin rm cordova-barcodescanner-plugin
Try building now. It should work.
2. Now install "cordova-plugin-barcodescanner@0.7.1" using below command:
> cordova plugin add cordova-plugin-barcodescanner@0.7.1
3. Update config.xml file with 'xmlns:android="http://schemas.android.com/apk/res/android"'.
4. update config.xml with below lines:
<config-file mode='merge' parent='/*' target='AndroidManifest.xml'>
<uses-permission android:name='android.permission.CAMERA' xmlns:android='http://schemas.android.com/apk/res/android' />
<uses-feature android:name='android.hardware.camera' xmlns:android='http://schemas.android.com/apk/res/android' />
<uses-feature android:name='android.hardware.camera.autofocus' xmlns:android='http://schemas.android.com/apk/res/android' />
</config-file>
Now if you try to build the project (cordova run android) it will work. Above changes help me to over come the issue. Hope it will help someone!!!
Reff: https://github.com/phonegap/phonegap-plugin-barcodescanner