java.lang.ClassCastException: android.support.v7.widget.AppCompatTextView cannot be cast to android.widget.ImageView

Stack Overflow | issa.ayoub.dev | 4 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

    android.support.v7.widget.AppCompatTextView cannot be cast to android.widget.ImageView

    Stack Overflow | 4 months ago | issa.ayoub.dev
    java.lang.ClassCastException: android.support.v7.widget.AppCompatTextView cannot be cast to android.widget.ImageView

    Root Cause Analysis

    1. java.lang.ClassCastException

      android.support.v7.widget.AppCompatTextView cannot be cast to android.widget.ImageView

      at android.support.design.widget.TabLayout$TabView.update()
    2. android.support.design
      TabLayout.addView
      1. android.support.design.widget.TabLayout$TabView.update(TabLayout.java:1675)
      2. android.support.design.widget.TabLayout$TabView.setTab(TabLayout.java:1627)
      3. android.support.design.widget.TabLayout.createTabView(TabLayout.java:927)
      4. android.support.design.widget.TabLayout.newTab(TabLayout.java:562)
      5. android.support.design.widget.TabLayout.addTabFromItemView(TabLayout.java:481)
      6. android.support.design.widget.TabLayout.addViewInternal(TabLayout.java:970)
      7. android.support.design.widget.TabLayout.addView(TabLayout.java:960)
      7 frames
    3. Android Platform
      LayoutInflater.inflate
      1. android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:862)
      2. android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
      3. android.view.LayoutInflater.rInflate(LayoutInflater.java:834)
      4. android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
      5. android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:861)
      6. android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
      7. android.view.LayoutInflater.rInflate(LayoutInflater.java:834)
      8. android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
      9. android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:861)
      10. android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
      11. android.view.LayoutInflater.rInflate(LayoutInflater.java:834)
      12. android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
      13. android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:861)
      14. android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
      15. android.view.LayoutInflater.rInflate(LayoutInflater.java:834)
      16. android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
      17. android.view.LayoutInflater.inflate(LayoutInflater.java:518)
      18. android.view.LayoutInflater.inflate(LayoutInflater.java:397)
      18 frames
    4. com.android.layoutlib
      Bridge.createSession
      1. com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:324)
      2. com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:429)
      2 frames
    5. com.android.tools.sdk-common
      LayoutLibrary.createSession
      1. com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:389)
      1 frame
    6. com.android.tools
      RenderTask$2.compute
      1. com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:548)
      2. com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:533)
      2 frames
    7. IDEA
      ApplicationImpl.runReadAction
      1. com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:966)
      1 frame
    8. com.android.tools
      RenderTask.lambda$inflate$53
      1. com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:533)
      2. com.android.tools.idea.rendering.RenderTask.lambda$inflate$53(RenderTask.java:659)
      2 frames
    9. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:266)
      2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      4. java.lang.Thread.run(Thread.java:745)
      4 frames