FragmentActivity onCreate的时候,一定要先调用super.onCreate(savedInstanceState);然后再做添加Fragment的操作,否则就会报这个错误。