java.lang.IllegalStateException

The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 2, found: 3 Pager id: com.shah.tabs:id/viewpager Pager class: class android.support.v4.view.ViewPager Problematic adapter: class com.shah.tabs.CustomSwipeAdapter

Solutions on the web15625

  • The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 2, found: 3 Pager id: com.shah.tabs:id/viewpager Pager class: class android.support.v4.view.ViewPager Problematic adapter: class com.shah.tabs.CustomSwipeAdapter
  • The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 1, found: 5 Pager id: com.example.max.infinistry:id/viewpager Pager class: class android.support.v4.view.ViewPager Problematic adapter: class com.example.max.infinistry.MyPagerAdapter
  • The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 1, found: 2 Pager id: /pager Pager class: class android.support.v4.view.ViewPager Problematic adapter: class ScreenSlidePagerAdapter
  • Stack trace

    • java.lang.IllegalStateException: The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 2, found: 3 Pager id: com.shah.tabs:id/viewpager Pager class: class android.support.v4.view.ViewPager Problematic adapter: class com.shah.tabs.CustomSwipeAdapter at android.support.v4.view.ViewPager.populate(ViewPager.java:1071) at android.support.v4.view.ViewPager.populate(ViewPager.java:1025) at android.support.v4.view.ViewPager.onTouchEvent(ViewPager.java:2114) at android.view.View.dispatchTouchEvent(View.java:8471) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2399) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2092) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2049) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2049) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2049) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2049) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2049) at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2369) at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1719) at android.app.Activity.dispatchTouchEvent(Activity.java:2742) at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2330) at android.view.View.dispatchPointerEvent(View.java:8666) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4123) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3989) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3544) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3597) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3563) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3680) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3571) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3737) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3544) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3597) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3563) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3571) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3544) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5807) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5781) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5752) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5897) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:143) at android.os.Looper.loop(Looper.java:122) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 year ago
    Unknown user
    2 times, 11 months ago
    Once, 10 months ago
    231 times, 1 year ago
    Unknown user
    Once, 1 year ago
    3 more bugmates