java.lang.NullPointerException: Attempt to invoke interface method 'void com.maplesyrupindustries.j.airportmeet.SettingsFragment$OnFragmentInteractionListener.setSwitchPending(java.lang.Boolean)' on a null object reference

  1. 0

    SwitchPreference null on lower sdk version (api level 21)

    Stack Overflow | 6 months ago | SpecialSnowflake
    java.lang.NullPointerException: Attempt to invoke interface method 'void com.maplesyrupindustries.j.airportmeet.SettingsFragment$OnFragmentInteractionListener.setSwitchPending(java.lang.Boolean)' on a null object reference
  2. 0
    samebug tip
    Use 'dialog' to access views from custom_layout layout.
  3. 0
    samebug tip
    The resource was accessed after it was dismissed.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

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

    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 interface method 'void com.maplesyrupindustries.j.airportmeet.SettingsFragment$OnFragmentInteractionListener.setSwitchPending(java.lang.Boolean)' on a null object reference

      at com.maplesyrupindustries.j.airportmeet.SettingsFragment.onCreateView()
    2. com.maplesyrupindustries.j
      SettingsFragment.onCreateView
      1. com.maplesyrupindustries.j.airportmeet.SettingsFragment.onCreateView(SettingsFragment.java:102)
      1 frame
    3. Android Platform
      FragmentManagerImpl.executePendingTransactions
      1. android.app.Fragment.performCreateView(Fragment.java:2053)
      2. android.app.FragmentManagerImpl.moveToState(FragmentManager.java:894)
      3. android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
      4. android.app.BackStackRecord.run(BackStackRecord.java:833)
      5. android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1452)
      6. android.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:483)
      6 frames
    4. android-support-v13
      FragmentPagerAdapter.finishUpdate
      1. android.support.v13.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:149)
      1 frame
    5. Android Support v4
      ViewPager.onMeasure
      1. android.support.v4.view.ViewPager.populate(ViewPager.java:1237)
      2. android.support.v4.view.ViewPager.populate(ViewPager.java:1085)
      3. android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1611)
      3 frames
    6. Android Platform
      ViewGroup.measureChildWithMargins
      1. android.view.View.measure(View.java:17430)
      2. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)
      2 frames
    7. android.support.design
      CoordinatorLayout.onMeasure
      1. android.support.design.widget.CoordinatorLayout.onMeasureChild(CoordinatorLayout.java:671)
      2. android.support.design.widget.HeaderScrollingViewBehavior.onMeasureChild(HeaderScrollingViewBehavior.java:90)
      3. android.support.design.widget.AppBarLayout$ScrollingViewBehavior.onMeasureChild(AppBarLayout.java:1319)
      4. android.support.design.widget.CoordinatorLayout.onMeasure(CoordinatorLayout.java:736)
      4 frames
    8. Android Platform
      FrameLayout.onMeasure
      1. android.view.View.measure(View.java:17430)
      2. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)
      3. android.widget.FrameLayout.onMeasure(FrameLayout.java:430)
      3 frames
    9. Android v7
      ContentFrameLayout.onMeasure
      1. android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:135)
      1 frame
    10. Android Platform
      FrameLayout.onMeasure
      1. android.view.View.measure(View.java:17430)
      2. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)
      3. android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436)
      4. android.widget.LinearLayout.measureVertical(LinearLayout.java:722)
      5. android.widget.LinearLayout.onMeasure(LinearLayout.java:613)
      6. android.view.View.measure(View.java:17430)
      7. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)
      8. android.widget.FrameLayout.onMeasure(FrameLayout.java:430)
      9. android.view.View.measure(View.java:17430)
      10. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)
      11. android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436)
      12. android.widget.LinearLayout.measureVertical(LinearLayout.java:722)
      13. android.widget.LinearLayout.onMeasure(LinearLayout.java:613)
      14. android.view.View.measure(View.java:17430)
      15. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)
      16. android.widget.FrameLayout.onMeasure(FrameLayout.java:430)
      16 frames
    11. Android
      PhoneWindow$DecorView.onMeasure
      1. com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2560)
      1 frame
    12. Android Platform
      ActivityThread.main
      1. android.view.View.measure(View.java:17430)
      2. android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2001)
      3. android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1166)
      4. android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1372)
      5. android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1054)
      6. android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5779)
      7. android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
      8. android.view.Choreographer.doCallbacks(Choreographer.java:580)
      9. android.view.Choreographer.doFrame(Choreographer.java:550)
      10. android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
      11. android.os.Handler.handleCallback(Handler.java:739)
      12. android.os.Handler.dispatchMessage(Handler.java:95)
      13. android.os.Looper.loop(Looper.java:135)
      14. android.app.ActivityThread.main(ActivityThread.java:5221)
      14 frames
    13. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame