2

The viewpager is in recylerview adapter in my app. When i invastigate live crashs from crashlytics then i encountered a crash which affects too much user.

the title of crash: FragmentManager.java line 1292 android.support.v4.app.FragmentManagerImpl.moveToState

in stack trace :"IllegalArgumentException: No view found for id 0x7f0e0196 (android:id/viewPager) for fragment HomePageSliderFragment

i dont know why it happens but still i couldnt get any solution to fix it yet because i didnt encountered this crash in the my test phones. i applied following solutions to fix it but after i performed this solution then there is another bug occured. https://stackoverflow.com/a/19900206/4862911

Is there a way to achive this crash? I dont want to seperate viewpager from the recyclerview adapter.

Thanks,

Community
  • 1
  • 1
aligur
  • 3,387
  • 3
  • 34
  • 51

2 Answers2

1

I solved it by passing childfragmentmanger reference to recylerview adapter from the fragment. Then i used it when initilaize viewpageradapter.

aligur
  • 3,387
  • 3
  • 34
  • 51
0

try changing the id in your XML layout for view pager,and also use the same id for view pager in your class

 ViewPager viewPager = (ViewPager) findViewById(R.id.pager);
Androidss
  • 47
  • 11