java.lang.NullPointerException

Attempt to invoke virtual method 'android.support.v4.app.FragmentManager android.support.v4.app.FragmentActivity.getSupportFragmentManager()' on a null object reference then the application crushs java.lang.NullPointerException: Attempt to invoke virtual method 'android.support.v4.app.FragmentManager android.support.v4.app.FragmentActivity.getSupportFragmentManager()' on a null object reference

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

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

Solutions on the web21249

  • via Stack Overflow by almsry
    , 5 months ago
    Attempt to invoke virtual method 'android.support.v4.app.FragmentManager android.support.v4.app.FragmentActivity.getSupportFragmentManager()' on a null object reference then the application crushs java.lang.NullPointerException: Attempt to invoke
  • Attempt to invoke virtual method 'android.support.v4.app.FragmentManager android.support.v4.app.FragmentActivity.getSupportFragmentManager()' on a null object reference
  • Attempt to invoke virtual method 'android.support.v4.app.FragmentManager android.support.v4.app.FragmentActivity.getSupportFragmentManager()' on a null object reference
  • Stack trace

    • java.lang.NullPointerException: Attempt to invoke virtual method 'android.support.v4.app.FragmentManager android.support.v4.app.FragmentActivity.getSupportFragmentManager()' on a null object reference then the application crushs java.lang.NullPointerException: Attempt to invoke virtual method 'android.support.v4.app.FragmentManager android.support.v4.app.FragmentActivity.getSupportFragmentManager()' on a null object reference at com.teqneia.blooddonation.BasicInfoFragment.doBack(BasicInfoFragment.java:245) at com.teqneia.blooddonation.MainActivity.onBackPressed(MainActivity.java:258) at android.app.Activity.onKeyUp(Activity.java:2530) at android.view.KeyEvent.dispatch(KeyEvent.java:2726) at android.app.Activity.dispatchKeyEvent(Activity.java:2798) at android.support.v7.app.AppCompatActivity.dispatchKeyEvent(AppCompatActivity.java:543) at android.support.v7.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:53) at android.support.v7.app.AppCompatDelegateImplBase$AppCompatWindowCallbackBase.dispatchKeyEvent(AppCompatDelegateImplBase.java:315) at android.support.v7.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:53) at com.android.internal.policy.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:2368) at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:4333) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4295) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3836) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3889) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3855) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3981) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3863) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4038) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3836) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3889) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3855) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3863) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3836) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3889) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3855) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4014) at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:4175) at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:2378) at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:1999) at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:1990) at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:2355) at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:141) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:330) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:5546) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684)

    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

    You’re the first here who have seen this exception.