【Android异常】The specified child already has a parent. You must call removeView() on the child's parent first.

错误信息: 

Caused by: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.

解决办法: 

View v = inflater.inflate(R.layout.preference_fragment, container, false);

原文地址:https://www.cnblogs.com/maxiaodoubao/p/3182399.html