Error record: this.requestWindowFeature ( Window.FEATURE_ NO_ Title) error or no effect

The requestWindowFeature method must be placed before the content view is initialized. I checked that this is the first one, but later I found that I changed the class inheritance. Before I inherited the Activity, I changed the class inheritance to AppCompatActivity.
At first I wondered if it was possible that AppCompatActivity had done something in its own super.onCreate. So the


On the


Finally, in the manifests file, we add an attribute to the Activity:


solves the problem.

The title bar is not an ordinary title bar. It is called ActionBar. Another solution is to call it after setContentView


solves the problem.

Read More: