java.lang.NullPointerException: Attempt to invoke virtual method 'int android.widget.RadioGroup.getCheckedRadioButtonId()' on a null object reference

  1. 1

    Application initial Activity

    Stack Overflow | 6 months ago | Иван Коданев
    java.lang.NullPointerException: Attempt to invoke virtual method 'int android.widget.RadioGroup.getCheckedRadioButtonId()' on a null object reference
  2. 0
    Initialize the variable before calling a method on it.
  3. 0

    I want to get text from radio button and store it in sqlite database but I am getting an error

    Stack Overflow | 3 months ago | veer
    java.lang.NullPointerException: Attempt to invoke virtual method 'int android.widget.RadioGroup.getCheckedRadioButtonId()' on a null object reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    Use 'dialog' to access views from custom_layout layout.
  6. 0
    The resource was accessed after it was dismissed.

    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 'int android.widget.RadioGroup.getCheckedRadioButtonId()' on a null object reference

      at ru.j_soft.contact.MainActivity.onSaveInstanceState()
    2. ru.j_soft.contact
      MainActivity.onSaveInstanceState
      1. ru.j_soft.contact.MainActivity.onSaveInstanceState(MainActivity.java:392)
      1 frame
    3. Android Platform
      ActivityThread.handleStopActivity
      1. android.app.Activity.performSaveInstanceState(Activity.java:1298)
      2. android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1289)
      3. android.app.ActivityThread.callCallActivityOnSaveInstanceState(ActivityThread.java:4088)
      4. android.app.ActivityThread.performStopActivityInner(ActivityThread.java:3490)
      5. android.app.ActivityThread.handleStopActivity(ActivityThread.java:3550)
      5 frames