We develop a multitask and multifidelity Gaussian process (MMGP) model to accurately predict and optimize the multiobjective performance of a flapping foil while minimizing the cost of high-fidelity data. Through a comparison of three kernels, we have selected and applied the spectral mixture kernel and validated the robustness and effectiveness of a multiacquisition function. To effectively incorporate data with varying levels of fidelity, we have adopted a linear prior formula-based multifidelity framework. Additionally, Bayesian optimization with a multiacquisition function is adopted by the MMGP model to enable multitask active learning. The results unequivocally demonstrate that the MMGP model serves as a highly capable and efficient framework for effectively addressing the multiobjective challenges associated with flapping foils.