java.lang.NullPointerException: Attempt to read from field 'java.lang.Object android.util.Pair.second' on a null object reference

GitHub | a4081675 | 1 week 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

    GitHub comment 59#301362523

    GitHub | 1 week ago | a4081675
    java.lang.NullPointerException: Attempt to read from field 'java.lang.Object android.util.Pair.second' on a null object reference
  2. 0

    GitHub comment 51#299116498

    GitHub | 3 weeks ago | nk-null
    java.lang.ClassCastException: com.gznt.mdmphone.view.adapter.MainLinearAdapter$MainLinearViewHolder cannot be cast to com.gznt.mdmphone.view.adapter.MainGridAdapter$MainGridViewHolder
  3. 0

    GitHub comment 38#299808535

    GitHub | 2 weeks ago | a4081675
    java.lang.NullPointerException: Attempt to write to field 'int android.support.v7.widget.RecyclerView$ViewHolder.mItemViewType' on a null object reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    有个错误

    GitHub | 3 months ago | QuincySx
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])' on a null object reference
  6. 0

    addAdapters 的问题

    GitHub | 2 months ago | kelvins22
    java.lang.IllegalStateException: Cannot change whether this adapter has stable IDs while the adapter has registered observers.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to read from field 'java.lang.Object android.util.Pair.second' on a null object reference

      at com.alibaba.android.vlayout.DelegateAdapter.findAdapterByIndex()
    2. com.alibaba.android
      DelegateAdapter.onCreateViewHolder
      1. com.alibaba.android.vlayout.DelegateAdapter.findAdapterByIndex(DelegateAdapter.java:492)
      2. com.alibaba.android.vlayout.DelegateAdapter.onCreateViewHolder(DelegateAdapter.java:122)
      2 frames
    3. Android v7
      RecyclerView$Recycler.getViewForPosition
      1. android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:6321)
      2. android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5509)
      3. android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5394)
      4. android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5390)
      4 frames
    4. com.alibaba.android
      VirtualLayoutManager.onLayoutChildren
      1. com.alibaba.android.vlayout.ExposeLinearLayoutManagerEx$LayoutState.next(ExposeLinearLayoutManagerEx.java:1607)
      2. com.alibaba.android.vlayout.VirtualLayoutManager$LayoutStateWrapper.next(VirtualLayoutManager.java:978)
      3. com.alibaba.android.vlayout.layout.BaseLayoutHelper.nextView(BaseLayoutHelper.java:110)
      4. com.alibaba.android.vlayout.layout.LinearLayoutHelper.layoutViews(LinearLayoutHelper.java:87)
      5. com.alibaba.android.vlayout.layout.BaseLayoutHelper.doLayout(BaseLayoutHelper.java:273)
      6. com.alibaba.android.vlayout.VirtualLayoutManager.layoutChunk(VirtualLayoutManager.java:574)
      7. com.alibaba.android.vlayout.ExposeLinearLayoutManagerEx.fill(ExposeLinearLayoutManagerEx.java:1140)
      8. com.alibaba.android.vlayout.ExposeLinearLayoutManagerEx.onLayoutChildren(ExposeLinearLayoutManagerEx.java:358)
      9. com.alibaba.android.vlayout.VirtualLayoutManager.onLayoutChildren(VirtualLayoutManager.java:398)
      9 frames
    5. Android v7
      RecyclerView.onLayout
      1. android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3537)
      2. android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3266)
      3. android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3798)
      3 frames
    6. Android Platform
      FrameLayout.onLayout
      1. android.view.View.layout(View.java:17637)
      2. android.view.ViewGroup.layout(ViewGroup.java:5575)
      3. android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079)
      4. android.view.View.layout(View.java:17637)
      5. android.view.ViewGroup.layout(ViewGroup.java:5575)
      6. android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
      7. android.widget.FrameLayout.onLayout(FrameLayout.java:261)
      8. android.view.View.layout(View.java:17637)
      9. android.view.ViewGroup.layout(ViewGroup.java:5575)
      10. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741)
      11. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585)
      12. android.widget.LinearLayout.onLayout(LinearLayout.java:1494)
      13. android.view.View.layout(View.java:17637)
      14. android.view.ViewGroup.layout(ViewGroup.java:5575)
      15. android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
      16. android.widget.FrameLayout.onLayout(FrameLayout.java:261)
      17. android.view.View.layout(View.java:17637)
      18. android.view.ViewGroup.layout(ViewGroup.java:5575)
      19. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741)
      20. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585)
      21. android.widget.LinearLayout.onLayout(LinearLayout.java:1494)
      22. android.view.View.layout(View.java:17637)
      23. android.view.ViewGroup.layout(ViewGroup.java:5575)
      24. android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
      25. android.widget.FrameLayout.onLayout(FrameLayout.java:261)
      26. android.view.View.layout(View.java:17637)
      27. android.view.ViewGroup.layout(ViewGroup.java:5575)
      28. android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
      29. android.widget.FrameLayout.onLayout(FrameLayout.java:261)
      29 frames
    7. Android
      DecorView.onLayout
      1. com.android.internal.policy.DecorView.onLayout(DecorView.java:727)
      1 frame
    8. Android Platform
      ActivityThread.main
      1. android.view.View.layout(View.java:17637)
      2. android.view.ViewGroup.layout(ViewGroup.java:5575)
      3. android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2346)
      4. android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2068)
      5. android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254)
      6. android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6338)
      7. android.view.Choreographer$CallbackRecord.run(Choreographer.java:874)
      8. android.view.Choreographer.doCallbacks(Choreographer.java:686)
      9. android.view.Choreographer.doFrame(Choreographer.java:621)
      10. android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
      11. android.os.Handler.handleCallback(Handler.java:751)
      12. android.os.Handler.dispatchMessage(Handler.java:95)
      13. android.os.Looper.loop(Looper.java:154)
      14. android.app.ActivityThread.main(ActivityThread.java:6121)
      14 frames
    9. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame
    10. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
      2 frames