You are running into a NullPointerException
because you are invoking a method on an object that is NULL at that time.
This could be because your
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// ...
}
method is called before your
@Override
public void onAttach(Activity activity) { }
method, and therefore, your variable mFragmentActivity
is NULL. In that case, your code
String.valueOf(mFragmentActivity);
will throw a NullPointerException
.