When android dynamically loads fragments, the above error will be reported. There is no dynamic addview code in the code, and the problem cannot be found for a long time. In fact, the problem is the inflater.inflate(R.layout.content_fragment, container); function in the onCreateView method has an error.
The inflater.inflate method has a two-parameter method and a three-parameter method. The last parameter of the two-parameter method is automatically filled with true by the system. To modify the above exception, just use the three-parameter method, and use FALSE for the last parameter.