The question title is the error I receive while deploying my Ionic app for Android. I think (but am not sure) this emanates because I use both the barcodeScanner
and Camera
plugins in my app, which both require the Camera permission. Is there something I should be doing when using two plugins which require the same permission? Also, is it adviseable to edit the AndroidManifest
file, and if yes, how exactly should I do it?
Edit:
Actually, the problem wasn't because I used the barcodeScanner
and Camera
plugins in my app. It was caused by the existence of barcodeScanner
and qrScanner
among my plugins (even though I used just barcodeScanner
in my app. Even though the accepted answer eliminated the error, I find it worthwhile pointing out that removing one of these plugins did as well:
cordova plugin remove cordova-plugin-qrscanner
As it is very clear from the Error message that two elements i.e. plugins are using same permission. To resolve such issue you can do the following:
Comment out/remove the line of uses-permission
and uses-feature
in ...\plugins\phonegap-plugin-barcodescanner\plugin.xml
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera">
rm platform android
add platform android
ionic cordova run android
No need to touch AndroidManifest.xml
file and also it is not advisable.
Hope this will help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With