Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by BabiSter
, 1 year ago
Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
via GitHub by galadril
, 2 years ago
Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
via GitHub by galadril
, 2 years ago
Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
via GitHub by galadril
, 2 years ago
Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
via GitHub by galadril
, 2 years ago
Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
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(PreferenceManager.java:375) at android.preference.PreferenceManager.getDefaultSharedPreferences(PreferenceManager.java:370) at com.sovraan.GCMPushReceiverService.onMessageReceived(GCMPushReceiverService.java:30) at com.google.android.gms.gcm.GcmListenerService.zzq(Unknown Source) at com.google.android.gms.gcm.GcmListenerService.zzp(Unknown Source) at com.google.android.gms.gcm.GcmListenerService.zzo(Unknown Source) at com.google.android.gms.gcm.GcmListenerService.zza(Unknown Source) at com.google.android.gms.gcm.GcmListenerService$1.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)