The activity bound by Fragment has been destroyed, the program references activity, and the null pointer will exit unexpectedly.
After the fragment was created, there was no commit operation, which made it impossible to instantiate the fragment.
The solution is to use judgment when using activities, as shown below:
@ Overlay
Public? Invalid? onHiddenChanged(boolean? hidd)? {
What if? (! hidd? & amp& amp? getActivity()? ! =? null)? {
System.out.println ("Do you want to execute this method");
}
}