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

Stack Overflow | user8430 | 8 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    How to unlock Android 6.0 by code

    Stack Overflow | 8 months ago | user8430
    android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.

    Root Cause Analysis

    1. android.view.ViewRootImpl$CalledFromWrongThreadException

      Only the original thread that created a view hierarchy can touch its views.

      at android.view.ViewRootImpl.checkThread()
    2. Android Platform
      Activity.onWindowAttributesChanged
      1. android.view.ViewRootImpl.checkThread(ViewRootImpl.java:6363)
      2. android.view.ViewRootImpl.requestLayout(ViewRootImpl.java:874)
      3. android.view.View.requestLayout(View.java:17483)
      4. android.view.View.setLayoutParams(View.java:11478)
      5. android.view.WindowManagerGlobal.updateViewLayout(WindowManagerGlobal.java:305)
      6. android.view.WindowManagerImpl.updateViewLayout(WindowManagerImpl.java:91)
      7. android.app.Activity.onWindowAttributesChanged(Activity.java:2596)
      7 frames
    3. Android v7
      WindowCallbackWrapper.onWindowAttributesChanged
      1. android.support.v7.view.WindowCallbackWrapper.onWindowAttributesChanged(WindowCallbackWrapper.java:108)
      1 frame
    4. Android Platform
      Window.dispatchWindowAttributesChanged
      1. android.view.Window.dispatchWindowAttributesChanged(Window.java:852)
      1 frame
    5. Android
      PhoneWindow.dispatchWindowAttributesChanged
      1. com.android.internal.policy.impl.PhoneWindow.dispatchWindowAttributesChanged(PhoneWindow.java:4252)
      1 frame
    6. Android Platform
      Window.addFlags
      1. android.view.Window.setFlags(Window.java:825)
      2. android.view.Window.addFlags(Window.java:771)
      2 frames