NullPointerException with android.support.v7.widget.Toolbar

后端 未结 12 998
旧巷少年郎
旧巷少年郎 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:15

    
    

    android.support.v7.widget.Toolbar.getTitle() on a null object reference happens due to title clashes between ids of and that of the id in toolbar.xml definition . To overcome this issue remove the id in as below and latest Lollipop material design shall work fine with toolbar

    
    

提交回复
热议问题