IllegalStateException: No activity FragmentManager.java
问题 I was using Eclipse to compile the app, I used to get this error but not a lot. But since I've switch to android studio, I'm getting this crash a lot. Its crashing pretty much every device. I've tried doing everything but can't seem to fix this issue. I've tried using both getfragmentManager() and getSupportFragmentManager(), getting this crash in both. Not sure what to do now? Below is the code I'm using to switch fragments. private void showFragment(Fragment fragment){ fragmentManager =