android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.


Solutions on the web

Solution icon of stackoverflow
Only the original thread that created a view hierarchy can touch its views.

Solution icon of github
via GitHub by c1rus
, 1 year ago
Only the original thread that created a view hierarchy can touch its views.

Solution icon of github
Only the original thread that created a view hierarchy can touch its views.

Solution icon of github
via GitHub by dragochristian
, 1 year ago
Only the original thread that created a view hierarchy can touch its views.

Solution icon of github
Only the original thread that created a view hierarchy can touch its views.

Solution icon of github
Only the original thread that created a view hierarchy can touch its views.

Solution icon of github
via GitHub by ffolkes
, 6 months ago
Only the original thread that created a view hierarchy can touch its views.

Solution icon of github
via GitHub by door43app
, 1 year ago
Only the original thread that created a view hierarchy can touch its views.

Solution icon of github
Only the original thread that created a view hierarchy can touch its views.

Solution icon of github
via GitHub by kumy
, 1 year ago
Only the original thread that created a view hierarchy can touch its views.

Stack trace

android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
	at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:6891)
	at android.view.ViewRootImpl.recomputeViewAttributes(ViewRootImpl.java:3247)
	at android.view.ViewGroup.recomputeViewAttributes(ViewGroup.java:1324)
	at android.view.ViewGroup.recomputeViewAttributes(ViewGroup.java:1324)
	at android.view.ViewGroup.recomputeViewAttributes(ViewGroup.java:1324)
	at android.view.View.setFlags(View.java:11580)
	at android.view.View.setKeepScreenOn(View.java:7554)
	at android.view.SurfaceView$1.handleMessage(SurfaceView.java:135)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:154)
	at android.os.HandlerThread.run(HandlerThread.java:61)

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

Once, 3 months ago
2 times, 6 months ago
Samebug visitor profile picture
Unknown user
Once, 7 months ago
7 times, 8 months ago
4 times, 8 months ago
28 more bugmates