In fact, starting from the principle, you will easily understand that what you want to bind is the control in the include, not the include, so it is natural to define the identification ID for the control, otherwise the object to be bound cannot be identified. And the essence of ButterKnife is to use findViewById. If you manually use the findViewById method, you will first get the include object, and then find the control to be bound by ViewById.
Try filling in the id for Toolbar
You don’t need merge in this case, just use Toolbar directly as the root element of layout_toolbar.xml
In fact, starting from the principle, you will easily understand that what you want to bind is the control in the include, not the include, so it is natural to define the identification ID for the control, otherwise the object to be bound cannot be identified. And the essence of ButterKnife is to use findViewById. If you manually use the findViewById method, you will first get the include object, and then find the control to be bound by ViewById.