I have a code module which implements viewpager with navigation drawer, however, when I run the code I get the following error
01-26 09:20:02.958: D/AndroidR
In my case I had the same error but my mistake was that I didn't declare my Toolbar.
So, before I use getSupportActionBar I had to find my toolbar and set the actionBar
appbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(appbar);
getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_nav_menu);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);