Skip to content Skip to sidebar Skip to footer

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 ever

Solution 1:

Okay I searched everywhere I couldn't find the fix. But making the following two changes I was able to fix the problem.

First, instead of passing the getChildFragmentManager() every time as an argument, I created an object in the application class and used that.

Second, Apparently I was using getChildFragmentManager() twice in the same fragment ie I had two nested fragments. I removed one.

Post a Comment for "Illegalstateexception: No Activity Fragmentmanager.java"