java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ListView.Messages/com.ListView.Messages.ChatMainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EditText.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 Ko Vartthan
, 1 year ago
Unable to start activity ComponentInfo{com.ListView.Messages/com.ListView.Messages.ChatMainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EditText.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
via Stack Overflow by Shailender Narang
, 1 year ago
Unable to start activity ComponentInfo{}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
via Stack Overflow by Appu
, 2 years ago
Unable to start activity ComponentInfo{com.h2o/com.h2o.AccountActivity}: 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 casguapo
, 2 years ago
Unable to start activity ComponentInfo{com.pi.cas.ndtc/com.pi.cas.ndtc.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 AbhiWill12
, 1 year ago
Unable to start activity ComponentInfo{com.lost.eventhandling/com.lost.eventhandling.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 ranjan joishi
, 1 year ago
Unable to start activity ComponentInfo{com.example.admin.march_09_project/com.example.admin.march_09_project.share_file_view}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EditText.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
at com.ListView.Messages.ChatMainActivity.setupEvents(ChatMainActivity.java:139)
at com.ListView.Messages.ChatMainActivity.onCreate(ChatMainActivity.java:51)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)

Users with the same issue

You are the first who have seen this exception.

Write tip

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