java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.Dialog.setCanceledOnTouchOutside(boolean)' on a null object reference

Stack Overflow | W. Paul | 5 months ago
  1. 0

    Even after removing an erroneous line of code, an error still persists

    Stack Overflow | 5 months ago | W. Paul
    java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.Dialog.setCanceledOnTouchOutside(boolean)' on a null object reference
  2. 0
    Use 'dialog' to access views from custom_layout layout.
  3. 0
    The resource was accessed after it was dismissed.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    The parsed JSON does not contains the requested field.
  6. 0
    Initialize the variable before calling a method on it.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'void android.app.Dialog.setCanceledOnTouchOutside(boolean)' on a null object reference

      at com.gcapps.richcardsscorekeeper.ErrorDialog.onCreateDialog()
    2. com.gcapps.richcardsscorekeeper
      ErrorDialog.onCreateDialog
      1. com.gcapps.richcardsscorekeeper.ErrorDialog.onCreateDialog(ErrorDialog.java:94)
      1 frame
    3. Android Platform
      ActivityThread.main
      1. android.app.DialogFragment.getLayoutInflater(DialogFragment.java:398)
      2. android.app.FragmentManagerImpl.moveToState(FragmentManager.java:904)
      3. android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1082)
      4. android.app.BackStackRecord.run(BackStackRecord.java:833)
      5. android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1467)
      6. android.app.FragmentManagerImpl$1.run(FragmentManager.java:452)
      7. android.os.Handler.handleCallback(Handler.java:739)
      8. android.os.Handler.dispatchMessage(Handler.java:95)
      9. android.os.Looper.loop(Looper.java:145)
      10. android.app.ActivityThread.main(ActivityThread.java:6134)
      10 frames
    4. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    5. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
      2 frames