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
Whenever such an error occurs. Try to check Following Things
Check what kind of Activity is being used, is it a simple android.app Activity or an AppCompatActivity or an ActionBarActivity and so on.
Check if your activity type which is extended falls under the compat category
example android.app based Activity/Fragment are non appCompat types, whereas android.support.v4.app.Fragment or android.support.v4.app.ActivityCompat are appCompat based
if it falls under appCompat we use getSupportActionBar() else for android.app types we can use getActionBar()
example: In the manifest file if theme applied is say android:theme="@android:style/Theme.Holo.Dialog" getActionBar() will work
but if theme applied for the activity in the manifest is as follows android:theme="@style/Theme.AppCompat.Light" then you have to use getSupportActionBar()