java.lang.NullPointerException

Attempt to invoke virtual method 'android.support.design.widget.FloatingActionButton de.tap.easy_xkcd.Activities.MainActivity.getFab()' on a null object reference E/AndroidRuntime(17298): at de.tap.easy_xkcd.fragments.comics.ComicFragment.onPrepareOptionsMenu(ComicFragment.java:572) Process: de.tap.easy_xkcd, PID: 16522

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web2

  • via GitHub by rugk
    ,
  • Stack trace

    • java.lang.NullPointerException: Attempt to invoke virtual method 'android.support.design.widget.FloatingActionButton de.tap.easy_xkcd.Activities.MainActivity.getFab()' on a null object reference E/AndroidRuntime(17298): at de.tap.easy_xkcd.fragments.comics.ComicFragment.onPrepareOptionsMenu(ComicFragment.java:572) Process: de.tap.easy_xkcd, PID: 16522 at de.tap.easy_xkcd.fragments.comics.ComicFragment$ComicAdapter.<init>(ComicFragment.java:133) at de.tap.easy_xkcd.fragments.comics.ComicBrowserFragment$ComicBrowserPagerAdapter.<init>(ComicBrowserFragment.java:193) at de.tap.easy_xkcd.fragments.comics.ComicBrowserFragment$updateNewest.onPostExecute(ComicBrowserFragment.java:167) at de.tap.easy_xkcd.fragments.comics.ComicBrowserFragment$updateNewest.onPostExecute(ComicBrowserFragment.java:125)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    We couldn't find other users who have seen this exception.