1

I have to do back action continuously, app crashed. It shows:

"Attempt to invoke virtual method 'android.content.SharedPreferences android.content.Context.getSharedPreferences(java.lang.String, int)' on a null object reference"

And another thing, I have shared preference class individually. When I need to get strings from shared preference, I have to add get preference object in on create function in my activity.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.