java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.john.myfirstapp/com.john.myfirstapp.DisplayMessageActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.getStringExtra(java.lang.String)' on a null object reference

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 John Matthews
, 1 year ago
Unable to instantiate activity ComponentInfo{com.john.myfirstapp/com.john.myfirstapp.DisplayMessageActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.getStringExtra(java.lang.String)' on a null object reference
via Stack Overflow by DaxHR
, 1 year ago
Unable to instantiate activity ComponentInfo{com.example.dario.mojaaplikacija/com.example.dario.mojaaplikacija.BenchA}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.getStringExtra(java.lang.String)' on a null object reference
via Stack Overflow by Abhi
, 1 year ago
Unable to start activity ComponentInfo{com.example.abhishek.httpclient/com.example.abhishek.httpclient.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.database.Cursor
via Stack Overflow by Ameer Akashe
, 1 year ago
Unable to instantiate activity ComponentInfo{com.example.ecohapp/com.example.ecohapp.SignUpActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
via Stack Overflow by no_ideaw
, 3 months ago
Unable to instantiate activity ComponentInfo{ir.noideaw.instafeed/ir.noideaw.instafeed.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
via Stack Overflow by 코딩중
, 1 week ago
Unable to instantiate activity ComponentInfo{com.example.ggavi.myapplication/com.example.ggavi.myapplication.MapsActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.john.myfirstapp/com.john.myfirstapp.DisplayMessageActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.getStringExtra(java.lang.String)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2327)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 3 hours ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 10 months ago
Samebug visitor profile picture
Unknown user
2 times, 7 months ago
280 times, 1 year ago
110 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.