Getting the error “Java.lang.IllegalStateException Activity has been destroyed” when using tabs with ViewPager
I have an application that consists of using ActionBarSherlock in tab mode.I have 5 tabs and the content of each tab is handled using fragments. For tab2 though, I have a fragment the xml file of which holds a ViewPager element which in turn has some fragment pages. When I initially start the application the application, I am able to switch between tabs no problem but when I press on tab2 for the second time I get the error mentioned above. The main activity is as follows: public class MainActivity extends SherlockFragmentActivity { @Override protected void onCreate(Bundle savedInstanceState)