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

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

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

    GitHub | 12 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