I am trying to implement a Navigation drawer, but I keep getting this error. I saw the similar questions but did not work for me. I have the following layout activity_main2.
This can also happen because of the new ConstraintLayout. Make sure the drawer layout isn't in the hierarchy of ConstraintLayout.
ConstraintLayout