我有GamePlayFragment.java错误,通知"片段应提供默认构造函数"
这是我的GamePlayFragment扩展片段
public GamePlayFragment(Context context, Handler handler, int musicVolume, int soundVolume, SharedPreferences preferencesSaveGamePlay) {
this.context = context;
this.handler = handler;
this.musicVolume = musicVolume;
this.soundVolume = soundVolume;
this.preferencesSaveGamePlay = preferencesSaveGamePlay;
layoutInflate = layoutInflate.from(context);
view = layoutInflate.inflate(R.layout.gameplay_layout, null);
initFragment();
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return view;
}
private void initFragment() {
layoutGamePlay = (FrameLayout) view.findViewById(R.id.myFrame);
gamePlay = new GamePlay(context, layoutGamePlay, handler, soundVolume,
musicVolume, preferencesSaveGamePlay);
layoutGamePlay.addView(gamePlay);
loadGameData();
}

如何删除该错误?
感谢