你自己的链接里已经有答案了啊
---------------
You should use
getActivity().getSupportFragmentManager()
If that is still giving you problems, then makre sure that your Activity extends FragmentActivity.
If that is still giving you problems,
Delete all of your imports,
Re-import with Ctrl + Shift + O, and
On every name clash, make sure you import from support.v4.*, not android.*.