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

Stack Overflow | BabiSter | 5 months ago
  1. 0

    Android Notification crashes my app

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

    Crash when activity is left when loading bus data

    GitHub | 11 months ago | michalbednarski
    java.lang.RuntimeException: An error occurred while executing doInBackground()
  3. 0

    how to get SharedPreference's null value in Android

    Stack Overflow | 10 months ago | Ralph
    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

    Android service in Chat App Crashes

    Stack Overflow | 10 months ago | Liel Azulay
    java.lang.ExceptionInInitializerError
  6. 0

    Access sharedpreference within Service

    Stack Overflow | 1 week ago | san g
    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 7 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:375)
    2. android.preference.PreferenceManager.getDefaultSharedPreferences(PreferenceManager.java:370)
    2 frames
  3. com.sovraan
    GCMPushReceiverService.onMessageReceived
    1. com.sovraan.GCMPushReceiverService.onMessageReceived(GCMPushReceiverService.java:30)
    1 frame
  4. com.google.android
    GcmListenerService$1.run
    1. com.google.android.gms.gcm.GcmListenerService.zzq(Unknown Source)
    2. com.google.android.gms.gcm.GcmListenerService.zzp(Unknown Source)
    3. com.google.android.gms.gcm.GcmListenerService.zzo(Unknown Source)
    4. com.google.android.gms.gcm.GcmListenerService.zza(Unknown Source)
    5. com.google.android.gms.gcm.GcmListenerService$1.run(Unknown Source)
    5 frames
  5. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
    3. java.lang.Thread.run(Thread.java:818)
    3 frames