java.lang.IllegalStateException: The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 3, found: 0 Pager id: ffffffff Pager class: class ti.modules.titanium.ui.widget.TiUIScrollableView$1 Problematic adapter: class ti.modules.titanium.ui.widget.TiUIScrollableView$ViewPagerAdapter

Appcelerator JIRA | Andrey Tkachenko | 8 months ago
  1. 0

    I cant clear views through setViews([]) Error: {code} [ERROR] : TiApplication: (main) [7060,7060] Sending event: exception on thread: main msg:java.lang.IllegalStateException: The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 3, found: 0 Pager id: ffffffff Pager class: class ti.modules.titanium.ui.widget.TiUIScrollableView$1 Problematic adapter: class ti.modules.titanium.ui.widget.TiUIScrollableView$ViewPagerAdapter; Titanium 5.2.1,2016/03/18 22:51,23e1c7d [ERROR] : TiApplication: java.lang.IllegalStateException: The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 3, found: 0 Pager id: ffffffff Pager class: class ti.modules.titanium.ui.widget.TiUIScrollableView$1 Problematic adapter: class ti.modules.titanium.ui.widget.TiUIScrollableView$ViewPagerAdapter [ERROR] : TiApplication: at android.support.v4.view.ViewPager.populate(ViewPager.java:1000) [ERROR] : TiApplication: at android.support.v4.view.ViewPager.populate(ViewPager.java:952) [ERROR] : TiApplication: at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1474) [ERROR] : TiApplication: at android.view.View.measure(View.java:15518) [ERROR] : TiApplication: at org.appcelerator.titanium.view.TiCompositeLayout.constrainChild(TiCompositeLayout.java:398) [ERROR] : TiApplication: at org.appcelerator.titanium.view.TiCompositeLayout.onMeasure(TiCompositeLayout.java:278) [ERROR] : TiApplication: at android.view.View.measure(View.java:15518) [ERROR] : TiApplication: at org.appcelerator.titanium.view.TiCompositeLayout.constrainChild(TiCompositeLayout.java:398) [ERROR] : TiApplication: at org.appcelerator.titanium.view.TiCompositeLayout.onMeasure(TiCompositeLayout.java:278) [ERROR] : TiApplication: at android.view.View.measure(View.java:15518) [ERROR] : TiApplication: at org.appcelerator.titanium.view.TiCompositeLayout.constrainChild(TiCompositeLayout.java:398) [ERROR] : TiApplication: at org.appcelerator.titanium.view.TiCompositeLayout.onMeasure(TiCompositeLayout.java:278) [ERROR] : TiApplication: at android.view.View.measure(View.java:15518) [ERROR] : TiApplication: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4825) [ERROR] : TiApplication: at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) [ERROR] : TiApplication: at android.support.v7.internal.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:124) [ERROR] : TiApplication: at android.view.View.measure(View.java:15518) [ERROR] : TiApplication: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4825) [ERROR] : TiApplication: at android.support.v7.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:393) [ERROR] : TiApplication: at android.view.View.measure(View.java:15518) [ERROR] : TiApplication: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4825) [ERROR] : TiApplication: at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) [ERROR] : TiApplication: at android.view.View.measure(View.java:15518) [ERROR] : TiApplication: at android.widget.LinearLayout.measureVertical(LinearLayout.java:847) [ERROR] : TiApplication: at android.widget.LinearLayout.onMeasure(LinearLayout.java:588) [ERROR] : TiApplication: at android.view.View.measure(View.java:15518) [ERROR] : TiApplication: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4825) [ERROR] : TiApplication: at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) [ERROR] : TiApplication: at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2176) [ERROR] : TiApplication: at android.view.View.measure(View.java:15518) [ERROR] : TiApplication: at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1874) [ERROR] : TiApplication: at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1089) [ERROR] : TiApplication: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1265) [ERROR] : TiApplication: at android.view.ViewRootImpl.doTraversal(ViewR [ERROR] : TiApplication: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4351) [ERROR] : TiApplication: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749) [ERROR] : TiApplication: at android.view.Choreographer.doCallbacks(Choreographer.java:562) [ERROR] : TiApplication: at android.view.Choreographer.doFrame(Choreographer.java:532) [ERROR] : TiApplication: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735) [ERROR] : TiApplication: at android.os.Handler.handleCallback(Handler.java:725) [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:92) [ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:137) [ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5041) [ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:511) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) {code} Test code: index.xml {code:xml} <Alloy> <Window class="container"> <ScrollableView id="scrollableView"> <View><Label>1</Label></View> <View><Label>2</Label></View> <View><Label>3</Label></View> </ScrollableView> <View height="Ti.UI.SIZE" top="0" layout="vertical"> <Button onClick="doClear">Clear</Button> </View> </Window> </Alloy> {code} index.js {code:javascript} function doClear(e) { $.scrollableView.setViews([]); } $.index.open(); {code}

    Appcelerator JIRA | 8 months ago | Andrey Tkachenko
    java.lang.IllegalStateException: The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 3, found: 0 Pager id: ffffffff Pager class: class ti.modules.titanium.ui.widget.TiUIScrollableView$1 Problematic adapter: class ti.modules.titanium.ui.widget.TiUIScrollableView$ViewPagerAdapter
  2. 0

    I cant clear views through setViews([]) Error: {code} [ERROR] : TiApplication: (main) [7060,7060] Sending event: exception on thread: main msg:java.lang.IllegalStateException: The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 3, found: 0 Pager id: ffffffff Pager class: class ti.modules.titanium.ui.widget.TiUIScrollableView$1 Problematic adapter: class ti.modules.titanium.ui.widget.TiUIScrollableView$ViewPagerAdapter; Titanium 5.2.1,2016/03/18 22:51,23e1c7d [ERROR] : TiApplication: java.lang.IllegalStateException: The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 3, found: 0 Pager id: ffffffff Pager class: class ti.modules.titanium.ui.widget.TiUIScrollableView$1 Problematic adapter: class ti.modules.titanium.ui.widget.TiUIScrollableView$ViewPagerAdapter [ERROR] : TiApplication: at android.support.v4.view.ViewPager.populate(ViewPager.java:1000) [ERROR] : TiApplication: at android.support.v4.view.ViewPager.populate(ViewPager.java:952) [ERROR] : TiApplication: at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1474) [ERROR] : TiApplication: at android.view.View.measure(View.java:15518) [ERROR] : TiApplication: at org.appcelerator.titanium.view.TiCompositeLayout.constrainChild(TiCompositeLayout.java:398) [ERROR] : TiApplication: at org.appcelerator.titanium.view.TiCompositeLayout.onMeasure(TiCompositeLayout.java:278) [ERROR] : TiApplication: at android.view.View.measure(View.java:15518) [ERROR] : TiApplication: at org.appcelerator.titanium.view.TiCompositeLayout.constrainChild(TiCompositeLayout.java:398) [ERROR] : TiApplication: at org.appcelerator.titanium.view.TiCompositeLayout.onMeasure(TiCompositeLayout.java:278) [ERROR] : TiApplication: at android.view.View.measure(View.java:15518) [ERROR] : TiApplication: at org.appcelerator.titanium.view.TiCompositeLayout.constrainChild(TiCompositeLayout.java:398) [ERROR] : TiApplication: at org.appcelerator.titanium.view.TiCompositeLayout.onMeasure(TiCompositeLayout.java:278) [ERROR] : TiApplication: at android.view.View.measure(View.java:15518) [ERROR] : TiApplication: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4825) [ERROR] : TiApplication: at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) [ERROR] : TiApplication: at android.support.v7.internal.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:124) [ERROR] : TiApplication: at android.view.View.measure(View.java:15518) [ERROR] : TiApplication: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4825) [ERROR] : TiApplication: at android.support.v7.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:393) [ERROR] : TiApplication: at android.view.View.measure(View.java:15518) [ERROR] : TiApplication: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4825) [ERROR] : TiApplication: at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) [ERROR] : TiApplication: at android.view.View.measure(View.java:15518) [ERROR] : TiApplication: at android.widget.LinearLayout.measureVertical(LinearLayout.java:847) [ERROR] : TiApplication: at android.widget.LinearLayout.onMeasure(LinearLayout.java:588) [ERROR] : TiApplication: at android.view.View.measure(View.java:15518) [ERROR] : TiApplication: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4825) [ERROR] : TiApplication: at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) [ERROR] : TiApplication: at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2176) [ERROR] : TiApplication: at android.view.View.measure(View.java:15518) [ERROR] : TiApplication: at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1874) [ERROR] : TiApplication: at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1089) [ERROR] : TiApplication: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1265) [ERROR] : TiApplication: at android.view.ViewRootImpl.doTraversal(ViewR [ERROR] : TiApplication: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4351) [ERROR] : TiApplication: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749) [ERROR] : TiApplication: at android.view.Choreographer.doCallbacks(Choreographer.java:562) [ERROR] : TiApplication: at android.view.Choreographer.doFrame(Choreographer.java:532) [ERROR] : TiApplication: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735) [ERROR] : TiApplication: at android.os.Handler.handleCallback(Handler.java:725) [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:92) [ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:137) [ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5041) [ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:511) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) {code} Test code: index.xml {code:xml} <Alloy> <Window class="container"> <ScrollableView id="scrollableView"> <View><Label>1</Label></View> <View><Label>2</Label></View> <View><Label>3</Label></View> </ScrollableView> <View height="Ti.UI.SIZE" top="0" layout="vertical"> <Button onClick="doClear">Clear</Button> </View> </Window> </Alloy> {code} index.js {code:javascript} function doClear(e) { $.scrollableView.setViews([]); } $.index.open(); {code}

    Appcelerator JIRA | 8 months ago | Andrey Tkachenko
    java.lang.IllegalStateException: The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 3, found: 0 Pager id: ffffffff Pager class: class ti.modules.titanium.ui.widget.TiUIScrollableView$1 Problematic adapter: class ti.modules.titanium.ui.widget.TiUIScrollableView$ViewPagerAdapter
  3. 0

    Titanium Android app crashes upon updating ScrollableView

    Stack Overflow | 2 years ago | starlord7
    java.lang.IllegalStateException: The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 1, found: 0 Pager id: ffffffff Pager class: class ti.modules.titanium.ui.widget.TiUIScrollableView$1 Problematic adapter: class ti.modules.titanium.ui.widget.TiUIScrollableView$ViewPagerAdapter
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 89#147067837

    GitHub | 1 year ago | X-Tender
    java.lang.IllegalStateException: The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 3, found: 2 Pager id: android:id/tabcontent Pager class: class ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTabGroup$1 Problematic adapter: class ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTabGroup$TabGroupFragmentPagerAdapter
  6. 0

    how to display images in ViewPager from SQLite Database Table in ANdroid

    Stack Overflow | 1 year ago | Androiddv
    java.lang.IllegalStateException: The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 0, found: 1 Pager id: com.example.tazeen.classnkk:id/Image_ViewPagers Pager class: class android.support.v4.view.ViewPager Problematic adapter: class com.example.tazeen.classnkk.AllPosts_Page$MyPagerAdapter
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.IllegalStateException

    The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 3, found: 0 Pager id: ffffffff Pager class: class ti.modules.titanium.ui.widget.TiUIScrollableView$1 Problematic adapter: class ti.modules.titanium.ui.widget.TiUIScrollableView$ViewPagerAdapter

    at android.support.v4.view.ViewPager.populate()
  2. Android Support v4
    ViewPager.onMeasure
    1. android.support.v4.view.ViewPager.populate(ViewPager.java:1000)
    2. android.support.v4.view.ViewPager.populate(ViewPager.java:952)
    3. android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1474)
    3 frames
  3. Android Platform
    View.measure
    1. android.view.View.measure(View.java:15518)
    1 frame
  4. org.appcelerator.titanium
    TiCompositeLayout.onMeasure
    1. org.appcelerator.titanium.view.TiCompositeLayout.constrainChild(TiCompositeLayout.java:398)
    2. org.appcelerator.titanium.view.TiCompositeLayout.onMeasure(TiCompositeLayout.java:278)
    2 frames
  5. Android Platform
    View.measure
    1. android.view.View.measure(View.java:15518)
    1 frame
  6. org.appcelerator.titanium
    TiCompositeLayout.onMeasure
    1. org.appcelerator.titanium.view.TiCompositeLayout.constrainChild(TiCompositeLayout.java:398)
    2. org.appcelerator.titanium.view.TiCompositeLayout.onMeasure(TiCompositeLayout.java:278)
    2 frames
  7. Android Platform
    View.measure
    1. android.view.View.measure(View.java:15518)
    1 frame
  8. org.appcelerator.titanium
    TiCompositeLayout.onMeasure
    1. org.appcelerator.titanium.view.TiCompositeLayout.constrainChild(TiCompositeLayout.java:398)
    2. org.appcelerator.titanium.view.TiCompositeLayout.onMeasure(TiCompositeLayout.java:278)
    2 frames
  9. Android Platform
    FrameLayout.onMeasure
    1. android.view.View.measure(View.java:15518)
    2. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4825)
    3. android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    3 frames
  10. Android v7
    ContentFrameLayout.onMeasure
    1. android.support.v7.internal.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:124)
    1 frame
  11. Android Platform
    ViewGroup.measureChildWithMargins
    1. android.view.View.measure(View.java:15518)
    2. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4825)
    2 frames
  12. Android v7
    ActionBarOverlayLayout.onMeasure
    1. android.support.v7.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:393)
    1 frame
  13. Android Platform
    FrameLayout.onMeasure
    1. android.view.View.measure(View.java:15518)
    2. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4825)
    3. android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    4. android.view.View.measure(View.java:15518)
    5. android.widget.LinearLayout.measureVertical(LinearLayout.java:847)
    6. android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
    7. android.view.View.measure(View.java:15518)
    8. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4825)
    9. android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    9 frames
  14. Android
    PhoneWindow$DecorView.onMeasure
    1. com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2176)
    1 frame
  15. Android Platform
    ViewRootImpl.performTraversals
    1. android.view.View.measure(View.java:15518)
    2. android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1874)
    3. android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1089)
    4. android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1265)
    4 frames