I have Created a Fragment for my bottom Tab bar, The tab bar has four fragments, In one of my fragments, I am in need of Slider to view testimonials of people one by one. In this case, I have used the ViewPager2 functionality to work on the slider, I have all the steps to create Viewpager2 from this video
After following all the steps I have getting an error stating
java.lang.IllegalStateException: viewpager1 must not be null (viewpager1 is my id of Viewpager2 function)