java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.eliott.proto_onrop/com.example.eliott.proto_onrop.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EditText.setText(java.lang.CharSequence)' 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

Samebug tips

,

Create an empty public constructor in your code.

Solutions on the web

via Stack Overflow by Eliott
, 7 months ago
Unable to start activity ComponentInfo{com.example.eliott.proto_onrop/com.example.eliott.proto_onrop.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EditText.setText(java.lang.CharSequence)' on a null object reference
via Stack Overflow by Taz Tazziano Taz427
, 2 weeks ago
Unable to start activity ComponentInfo{pt.edu.es_loule/pt.edu.es_loule.LoginActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EditText.setText(java.lang.CharSequence)' on a null object reference
via Stack Overflow by Rao
, 3 months ago
Unable to start activity ComponentInfo{com.example.rao.myapplication/com.example.rao.myapplication.LoginActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EditText.setText(java.lang.CharSequence)' on a null object reference
via Stack Overflow by anj kri
, 2 weeks ago
Unable to start activity ComponentInfo{com.example.anjana.decorightkitchen/com.example.anjana.decorightkitchen.activity.EnquiryViewActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EditText.setText(java.lang.CharSequence)' on a null object reference
via Stack Overflow by Firifire
, 1 year ago
Unable to start activity ComponentInfo{com.firifire/com.firifire.SettingsActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.preference.EditTextPreference.setTitle(java.lang.CharSequence)' on a null object reference
via Stack Overflow by GermanMike
, 1 year ago
Unable to start activity ComponentInfo{com.example.michael.counter/com.example.michael.counter.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.eliott.proto_onrop/com.example.eliott.proto_onrop.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EditText.setText(java.lang.CharSequence)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)

Users with the same issue

66 times, 4 weeks ago
Once, 2 months ago
33 times, 3 months ago
8 times, 4 months ago
468 times, 4 months ago

Write tip

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