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

GitHub | daniele-athome | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Drawable created from another thread

    GitHub | 6 months ago | daniele-athome
    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
      Drawable.setBounds
      1. android.view.ViewRootImpl.checkThread(ViewRootImpl.java:6814)
      2. android.view.ViewRootImpl.invalidateChildInParent(ViewRootImpl.java:978)
      3. android.view.ViewGroup.invalidateChild(ViewGroup.java:5100)
      4. android.view.View.invalidateInternal(View.java:12826)
      5. android.view.View.invalidate(View.java:12790)
      6. android.view.View.invalidate(View.java:12774)
      7. android.widget.ImageView.invalidateDrawable(ImageView.java:248)
      8. android.graphics.drawable.Drawable.invalidateSelf(Drawable.java:387)
      9. android.graphics.drawable.ShapeDrawable.updateShape(ShapeDrawable.java:476)
      10. android.graphics.drawable.ShapeDrawable.onBoundsChange(ShapeDrawable.java:333)
      11. android.graphics.drawable.Drawable.setBounds(Drawable.java:170)
      11 frames
    3. org.kontalk.util
      MessageUtils.drawableToBitmap
      1. org.kontalk.util.MessageUtils.drawableToBitmap(MessageUtils.java:882)
      1 frame
    4. org.kontalk.ui
      MessagingNotification$1.run
      1. org.kontalk.ui.MessagingNotification.updateMessagesNotification(MessagingNotification.java:368)
      2. org.kontalk.ui.MessagingNotification$1.run(MessagingNotification.java:146)
      2 frames
    5. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:833)
      1 frame