使用getActivity().getChildFragmentManager()是不可以的,必须要用this,而this是fragment对象。所有正确的写法是: this.getChildFragmentManager();