java.lang.RuntimeException

Unable to start activity ComponentInfo{ui.activity.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EditText.setText(java.lang.CharSequence)' on a null object reference

Solutions on the web45833

  • via Stack Overflow by Esteban
    , 6 months ago
    Unable to start activity ComponentInfo{ui.activity.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EditText.setText(java.lang.CharSequence)' on a null object reference
  • 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 nikhil
    , 10 months ago
    Unable to start activity ComponentInfo{com.example.nikhil.amazon1/com.example.nikhil.amazon1.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EditText.setText(java.lang.CharSequence)' on a null object reference
  • Stack trace

    • java.lang.RuntimeException: Unable to start activity ComponentInfo{ui.activity.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:2665) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726) at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4519)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    3 times, 2 weeks ago
    4 times, 2 weeks ago
    8 times, 3 months ago
    6 times, 6 months ago
    19 times, 6 months ago
    102 more bugmates