Fragment Can not perform this action after onSaveInstanceState

将fragmentTransaction.commit()改为fragmentTransaction.commitAllowingStateLoss()

如果还不行,那就去try catch异常处理

你可能感兴趣的:(android)