1.错误情况 2.解决方法 在BaseFragment类把import android.app.Fragment ;替换为import android.support.v4.app.Fragment ; 改为如图所示 改完后错误提示没有了