NullPointerException with android.support.v7.widget.Toolbar

后端 未结 12 1013
旧巷少年郎
旧巷少年郎 2021-01-07 17:53

I am currently trying to implement a navigation drawer in my app. I am having an issue with the Toolbar being null. I have done many searches online and tried many different

12条回答
  •  余生分开走
    2021-01-07 18:19

    I solved the issue with the toolbar. I realized after hours of searching the web and trying different things, I realized that my code wasn't wrong, it was using layouts from the layout-21 not the layout folder since the emulation for Android 5.0. All modification I had made were in the layout folder. I made the changes to the xml files in the layout-21 folder and the problem was solved. Sorry for the wasted time and post.

提交回复
热议问题