java.lang.RuntimeException

cancelAutoFocus failed

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web9

  • via GitHub by MegaMattMiller
    ,
  • via GitHub by yanayzimran
    ,
  • Stack trace

    • java.lang.RuntimeException: cancelAutoFocus failed at android.hardware.Camera.native_cancelAutoFocus(Native Method) at android.hardware.Camera.cancelAutoFocus(Camera.java:1364) 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) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    We couldn't find other users who have seen this exception.