原因fragment必须先add(),才能remove(),故remove前先做判空操作 参考:http://www.cnblogs.com/hixin/p/4427276.html 转载于:https://www.cnblogs.com/butterfly-clover/p/5445588.html