java.lang.RuntimeException: cancelAutoFocus failed

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by MegaMattMiller
, 1 year ago
cancelAutoFocus failed
via GitHub by yanayzimran
, 1 year ago
cancelAutoFocus failed
via GitHub by teolemon
, 11 months ago
cancelAutoFocus failed
via GitHub by Carpetfizz
, 11 months ago
cancelAutoFocus failed
java.lang.RuntimeException: cancelAutoFocus failed
at android.hardware.Camera.native_cancelAutoFocus(Native Method)
at me.dm7.barcodescanner.core.CameraPreview.stopCameraPreview(
at me.dm7.barcodescanner.core.CameraPreview.surfaceDestroyed(
at android.view.SurfaceView.updateWindow(
at android.view.SurfaceView.onWindowVisibilityChanged(
at android.view.View.dispatchDetachedFromWindow(
at android.view.ViewGroup.removeAllViewsInLayout(
at android.view.ViewGroup.removeAllViews(
at me.dm7.barcodescanner.core.BarcodeScannerView.setupLayout(
at me.dm7.barcodescanner.core.BarcodeScannerView.setupCameraPreview(
at me.dm7.barcodescanner.core.CameraHandlerThread$1$
at android.os.Handler.handleCallback(
at android.os.Handler.dispatchMessage(
at android.os.Looper.loop(

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 month ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.