dm77 / barcodescanner

Barcode Scanner Libraries for Android
Other
5.46k stars 1.43k forks source link

I keep getting this error!? #530

Closed habouseif closed 4 years ago

habouseif commented 4 years ago

hello, i used barcode scanner for my app , and its working , but when the activity is loaded I keep getting the following error but the app is not crashing itd working i dont know what should i do plzz help! java.lang.RuntimeException: cancelAutoFocus failed java.lang.RuntimeException: cancelAutoFocus failed at android.hardware.Camera.native_cancelAutoFocus(Native Method) if i setAutoFocus(false) the app is crashing the code mScannerView = new ZXingScannerView(this); scannViewout.addView(mScannerView); mScannerView.setResultHandler(this); mScannerView.startCamera(); mScannerView.setAutoFocus(true); mScannerView.setSoundEffectsEnabled(true);