那个add();怎么一直显示错误 错误提示The method add(int, Fragment) in the type FragmentTransaction is not applicable for the arguments (int, MyFragment2)说是要把上面的 MyFragment2 fragment2=new MyFragment2();
case R.id.second :{
MyFragment2 fragment2=new MyFragment2();
FragmentManager fragmentManager = getFragmentManager();
FragmentTransaction beginTransaction = fragmentManager.beginTransaction();
beginTransaction.add(R.id.frame, fragment2);
break;