I have an activity holding a fragment, in this fragment there is a button , when it is clicked, a dialog is popped out.
In this dialog, there is a Viewpager, which
getChildFragmentManager() is available since API 17 while you're using the v4 support library. Try using the support fragment manager instead:
PagerDialog dialog = new PagerDialog(getActivity(), getActivity().getSupportFragmentManager());