java.lang.ClassCastException: com.google.gson.internal.LinkedTreeMap cannot be cast to app.com.x.by

Stack Overflow | Jeroen Kappé | 5 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Gson and proguard error, even with the given proguard rules

    Stack Overflow | 5 months ago | Jeroen Kappé
    java.lang.ClassCastException: com.google.gson.internal.LinkedTreeMap cannot be cast to app.com.x.by

    Root Cause Analysis

    1. java.lang.ClassCastException

      com.google.gson.internal.LinkedTreeMap cannot be cast to app.com.x.by

      at app.com.x.ca.getView()
    2. app.com.x
      ca.getView
      1. app.com.x.ca.getView(Unknown Source)
      1 frame
    3. Android Platform
      ViewGroup.layout
      1. android.widget.AbsListView.obtainView(AbsListView.java:2346)
      2. android.widget.ListView.makeAndAddView(ListView.java:1876)
      3. android.widget.ListView.fillDown(ListView.java:702)
      4. android.widget.ListView.fillFromTop(ListView.java:763)
      5. android.widget.ListView.layoutChildren(ListView.java:1685)
      6. android.widget.AbsListView.onLayout(AbsListView.java:2148)
      7. android.view.View.layout(View.java:16636)
      8. android.view.ViewGroup.layout(ViewGroup.java:5437)
      9. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743)
      10. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586)
      11. android.widget.LinearLayout.onLayout(LinearLayout.java:1495)
      12. android.view.View.layout(View.java:16636)
      13. android.view.ViewGroup.layout(ViewGroup.java:5437)
      13 frames
    4. Android Support v4
      ViewPager.onLayout
      1. android.support.v4.view.ViewPager.onLayout(Unknown Source)
      1 frame
    5. Android Platform
      ViewGroup.layout
      1. android.view.View.layout(View.java:16636)
      2. android.view.ViewGroup.layout(ViewGroup.java:5437)
      3. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743)
      4. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586)
      5. android.widget.LinearLayout.onLayout(LinearLayout.java:1495)
      6. android.view.View.layout(View.java:16636)
      7. android.view.ViewGroup.layout(ViewGroup.java:5437)
      7 frames
    6. android.support.design
      CoordinatorLayout.onLayout
      1. android.support.design.widget.ar.b(Unknown Source)
      2. android.support.design.widget.ck.a(Unknown Source)
      3. android.support.design.widget.AppBarLayout$ScrollingViewBehavior.a(Unknown Source)
      4. android.support.design.widget.CoordinatorLayout.onLayout(Unknown Source)
      4 frames
    7. Android Platform
      FrameLayout.onLayout
      1. android.view.View.layout(View.java:16636)
      2. android.view.ViewGroup.layout(ViewGroup.java:5437)
      3. android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
      4. android.widget.FrameLayout.onLayout(FrameLayout.java:273)
      5. android.view.View.layout(View.java:16636)
      6. android.view.ViewGroup.layout(ViewGroup.java:5437)
      7. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743)
      8. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586)
      9. android.widget.LinearLayout.onLayout(LinearLayout.java:1495)
      10. android.view.View.layout(View.java:16636)
      11. android.view.ViewGroup.layout(ViewGroup.java:5437)
      12. android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
      13. android.widget.FrameLayout.onLayout(FrameLayout.java:273)
      14. android.view.View.layout(View.java:16636)
      15. android.view.ViewGroup.layout(ViewGroup.java:5437)
      16. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743)
      17. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586)
      18. android.widget.LinearLayout.onLayout(LinearLayout.java:1495)
      19. android.view.View.layout(View.java:16636)
      20. android.view.ViewGroup.layout(ViewGroup.java:5437)
      21. android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
      22. android.widget.FrameLayout.onLayout(FrameLayout.java:273)
      22 frames
    8. Android
      PhoneWindow$DecorView.onLayout
      1. com.android.internal.policy.PhoneWindow$DecorView.onLayout(PhoneWindow.java:2678)
      1 frame
    9. Android Platform
      Looper.loop
      1. android.view.View.layout(View.java:16636)
      2. android.view.ViewGroup.layout(ViewGroup.java:5437)
      3. android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2171)
      4. android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1931)
      5. android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107)
      6. android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013)
      7. android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
      8. android.view.Choreographer.doCallbacks(Choreographer.java:670)
      9. android.view.Choreographer.doFrame(Choreographer.java:606)
      10. android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
      11. android.os.Handler.handleCallback(Handler.java:739)
      12. android.os.Handler.dispatchMessage(Handler.java:95)
      13. android.os.Looper.loop(Looper.java:148)
      13 frames