title: Error setting Toolbar as ActionBar
body: <p>I'm trying to replace the ActionBar of my app with a Toolbar but I can't because I can't use setSupportActionBar(). It says "setSupportActionBar() is undefined for the type MainActivity" even if MainActivity extends ActionBarActivity.
  I don't know what to do, any help? Do you need me to post my code?</p>
  
  <p>EDIT:
  Now the code works but my app crashes on start and it says: "Attempt to invoke virtual method getTitle()". What do I miss?</p>
  
  <p>EDIT2:
  Everything works I forgot I had a Fragment and because of that it gave me nullPointer</p>