Barcode - could not initialize camera (Android)

I’ve tried adding a barcode scanning button to one of my apps — it works in the Builder, but on my Android device, it gives me an error — “Could not initialize camera”. I have confirmed that the permission to use the camera is enabled. This happens in the downloaded app and the Chrome web browser on my Android device.