java.io.IOException: setPreviewTexture failed


Solutions on the web

Solution icon of github
via GitHub by Seroga88i
, 11 months ago
setPreviewTexture failed

Solution icon of github
via GitHub by Carpetfizz
, 8 months ago
setPreviewTexture failed

Solution icon of github
via GitHub by fahimk
, 1 year ago
setPreviewTexture failed

Solution icon of github
via GitHub by anjawahl
, 11 months ago
setPreviewTexture failed

Solution icon of github
setPreviewTexture failed

Stack trace

java.io.IOException: setPreviewTexture failed
	at android.hardware.Camera.setPreviewSurface(Native Method)
	at android.hardware.Camera.setPreviewDisplay(Camera.java:629)
	at me.dm7.barcodescanner.core.CameraPreview.showCameraPreview(CameraPreview.java:83)
	at me.dm7.barcodescanner.core.CameraPreview.surfaceChanged(CameraPreview.java:68)
	at android.view.SurfaceView.updateWindow(SurfaceView.java:630)
	at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:161)
	at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:944)
	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2205)
	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254)
	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6337)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874)
	at android.view.Choreographer.doCallbacks(Choreographer.java:686)
	at android.view.Choreographer.doFrame(Choreographer.java:621)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
	at android.os.Handler.handleCallback(Handler.java:751)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:154)
	at android.app.ActivityThread.main(ActivityThread.java:6119)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

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

Samebug visitor profile picture
Unknown user
Once, 1 year ago
3 times, 1 year ago