Android Error [Attempt to invoke virtual method 'void android.app.ActionBar' on a null object reference]

后端 未结 24 2000
误落风尘
误落风尘 2020-11-28 22:13

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         


        
24条回答
  •  鱼传尺愫
    2020-11-28 22:47

    The Up Button is usually activated for Low-level Activities. In your manifest I only see the MainActivity. I don't think it makes sense to activate the up button for the main activity. Create an activity, then in the manifest add the parentActivityName attribute. Then activate the up button on the activity's onCreate method.
    This should help.
    https://developer.android.com/training/appbar/up-action.html

提交回复
热议问题