0

I've tried to do everything as in this tutorial: but I don't know what is the problem there.

     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.ActionBar.setBackgroundDrawable(android.graphics.drawable.Drawable)' on a null object reference
            at info.androidhive.customlistviewvolley.MainActivity.onCreate(MainActivity.java:55)
            at android.app.Activity.performCreate(Activity.java:6185)
Ali Bdeir
  • 4,151
  • 10
  • 57
  • 117
Almas
  • 1
  • 3
  • Initialize your ActionBar before setting it's background. – Anton Kazakov Sep 18 '16 at 12:10
  • What line is at your `onCreate()` method at MainActivity at line 55? To find out, go to the logcat where the crash happens, a line will contain `MainActivity.java:55` in blue, click there, it will take you to where the crash is – Ali Bdeir Sep 18 '16 at 12:59
  • @AbAppletic thanks, I just commented these lines and compiled again. My error was so ridiculous. Thank you for your response :) – Almas Sep 18 '16 at 13:40

0 Answers0