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 Jonathon Charles Loch
, 1 year ago
Attempt to invoke interface method 'android.content.SharedPreferences$Editor android.content.SharedPreferences$Editor.putString(java.lang.String, java.lang.String)' on a null object reference
via Stack Overflow by Sid
, 1 year ago
Attempt to invoke virtual method 'void android.app.ActionBar.setTitle(int)' on a null object reference
via Stack Overflow by Brad Waterhouse
, 1 month ago
Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
via Stack Overflow by Axium
, 3 months ago
Attempt to invoke virtual method 'android.content.SharedPreferences android.content.Context.getSharedPreferences(java.lang.String, int)' on a null object reference
via Stack Overflow by user7939485
, 6 months ago
Attempt to invoke virtual method 'android.database.Cursor android.database.sqlite.SQLiteDatabase.query(java.lang.String, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String)' on a null object reference
via Stack Overflow by sockevalley
, 7 months ago
Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference
java.lang.NullPointerException: Attempt to invoke interface method 'android.content.SharedPreferences$Editor android.content.SharedPreferences$Editor.putString(java.lang.String, java.lang.String)' on a null object reference	at com.lochdownstudios.simplePurchaseOrderer.MainActivity.save(MainActivity.java:119)	at com.lochdownstudios.simplePurchaseOrderer.MainActivity.onCreate(MainActivity.java:39)	at android.app.Activity.performCreate(Activity.java:6876)	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135)	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206)	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)