java.lang.RuntimeException: Unable to start activity ComponentInfo{com.message_of_aladha.dexter.message_of_aladha/com.message_of_aladha.dexter.message_of_aladha.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' 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 Manar Abo Safia
, 1 year ago
Unable to start activity ComponentInfo{com.message_of_aladha.dexter.message_of_aladha/com.message_of_aladha.dexter.message_of_aladha.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
via Stack Overflow by nitzdaking
, 1 year ago
Unable to start activity ComponentInfo{sp.umavibe.com.sp404/sp.umavibe.com.sp404.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
via Stack Overflow by Johnny
, 1 year ago
Unable to start activity ComponentInfo{com.example.myname.myapp/com.example.myname.myapp.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
via Stack Overflow by Demirhan Ozel
, 1 year ago
Unable to start activity ComponentInfo{net.citrusdynamics.citrus/net.citrusdynamics.citrus.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
via Stack Overflow by mercenariez
, 1 year ago
Unable to start activity ComponentInfo{com.example.matthew.test1/com.example.matthew.test1.NewActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
via Stack Overflow by MoaLaiSkirulais
, 1 year ago
Unable to start activity ComponentInfo{moalaiskirulais.com.arrayadapter/moalaiskirulais.com.arrayadapter.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.message_of_aladha.dexter.message_of_aladha/com.message_of_aladha.dexter.message_of_aladha.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)

Users with the same issue

31 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 10 months ago
9 times, 11 months ago
6 times, 4 months ago
184 times, 9 months ago
109 more bugmates

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