我按照android文档中的教程如何在Fragment中使用Tabhost,但我总是
The method setup(android.content.Context, android.support.v4.app.FragmentManager, int) in the type FragmentTabHost is not applicable for the arguments (android.content.Context, android.app.FragmentManager, int)
我的设置命令是这样的:
mTabHost.setup( getActivity().getApplicationContext(), getChildFragmentManager(), R.layout.fragment_vc_view);
答案 0 :(得分:9)
听起来您在其中调用设置方法的类扩展android.app.Fragment
而不是android.support.v4.app.Fragment
。