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.
Make sure your activity is not a "Dialog" activity, check in the manifest. I made this mistake and got the error.