java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference

GitHub | Lerist | 10 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

    itemCount==0 的时候发生NullPointerException, 希望可以解决一下, 谢谢Thanks

    GitHub | 10 months ago | Lerist
    java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference

      at com.azoft.carousellayoutmanager.CarouselLayoutManager.getScrollItemSize()
    2. com.azoft.carousellayoutmanager
      CenterScrollListener.onScrollStateChanged
      1. com.azoft.carousellayoutmanager.CarouselLayoutManager.getScrollItemSize(CarouselLayoutManager.java:574)
      2. com.azoft.carousellayoutmanager.CarouselLayoutManager.getMaxScrollOffset(CarouselLayoutManager.java:415)
      3. com.azoft.carousellayoutmanager.CarouselLayoutManager.getCurrentScrollPosition(CarouselLayoutManager.java:404)
      4. com.azoft.carousellayoutmanager.CarouselLayoutManager.getOffsetCenterView(CarouselLayoutManager.java:584)
      5. com.azoft.carousellayoutmanager.CenterScrollListener.onScrollStateChanged(CenterScrollListener.java:25)
      5 frames
    3. Android v7
      RecyclerView.dispatchOnScrollStateChanged
      1. android.support.v7.widget.RecyclerView.dispatchOnScrollStateChanged(RecyclerView.java:3990)
      1 frame