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(CameraPreview.java:115)
at me.dm7.barcodescanner.core.CameraPreview.surfaceDestroyed(CameraPreview.java:74)
at android.view.SurfaceView.updateWindow(SurfaceView.java:696)
at android.view.SurfaceView.onWindowVisibilityChanged(SurfaceView.java:316)
at android.view.View.dispatchDetachedFromWindow(View.java:15847)
at android.view.ViewGroup.removeAllViewsInLayout(ViewGroup.java:5136)
at android.view.ViewGroup.removeAllViews(ViewGroup.java:5082)
at me.dm7.barcodescanner.core.BarcodeScannerView.setupLayout(BarcodeScannerView.java:43)
at me.dm7.barcodescanner.core.BarcodeScannerView.setupCameraPreview(BarcodeScannerView.java:87)
at me.dm7.barcodescanner.core.CameraHandlerThread$1$1.run(CameraHandlerThread.java:31)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7229)

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.