java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference

Stack Overflow | Destry | 3 months ago
  1. 0

    Shared Preferences causing null pointer exception when switching fragments

    Stack Overflow | 3 months ago | Destry
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
  2. 0

    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference

    GitHub | 8 months ago | galadril
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
  3. 0

    NullPointerException in IntroductoryOverlay

    GitHub | 8 months ago | adrianrdzv
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    .getContext() / this produces null object reference inside PreferenceActivity

    Stack Overflow | 1 year ago | MalumAtire832
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{nl.knapper_development.www.jrw/nl.knapper_development.www.jrw.instelling}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
  6. 0

    rotated device on library screen

    GitHub | 1 year ago | door43app
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference

  1. ivotje50 2 times, last 5 months ago
  2. joni1408 1 times, last 6 months ago
  3. Mihail Melnic 2 times, last 6 months ago
  4. asvid 209 times, last 7 months ago
  5. martyn 2 times, last 8 months ago
3 more registered users
4 unregistered visitors
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 'java.lang.String android.content.Context.getPackageName()' on a null object reference

    at android.preference.PreferenceManager.getDefaultSharedPreferencesName()
  2. Android Platform
    PreferenceManager.getDefaultSharedPreferences
    1. android.preference.PreferenceManager.getDefaultSharedPreferencesName(PreferenceManager.java:376)
    2. android.preference.PreferenceManager.getDefaultSharedPreferences(PreferenceManager.java:371)
    2 frames
  3. com.horizonservers.horizon
    MapFragment$Medium$1.onFinish
    1. com.horizonservers.horizon.MapFragment$Medium$1.onFinish(MapFragment.java:658)
    1 frame
  4. Android Platform
    ActivityThread.main
    1. android.os.CountDownTimer$1.handleMessage(CountDownTimer.java:127)
    2. android.os.Handler.dispatchMessage(Handler.java:102)
    3. android.os.Looper.loop(Looper.java:148)
    4. android.app.ActivityThread.main(ActivityThread.java:7325)
    4 frames
  5. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Native Method)
    1 frame
  6. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
    2 frames