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

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 Stack Overflow by zuzu_yun
, 1 year ago
Only the original thread that created a view hierarchy can touch its views.
via GitHub by dragontamer8740
, 1 year ago
Only the original thread that created a view hierarchy can touch its views.
via Stack Overflow by user1348718
, 2 years ago
via GitHub by Z3r0byte
, 1 year ago
Only the original thread that created a view hierarchy can touch its views.
via Stack Overflow by Abhi
, 1 year ago
Only the original thread that created a view hierarchy can touch its views.
via Stack Overflow by anonymous noob
, 2 years ago
Only the original thread that created a view hierarchy can touch its views.
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)

Users with the same issue

Once, 6 months ago
2 times, 8 months ago
7 times, 10 months ago
4 times, 11 months ago
4 times, 1 year ago

Write tip

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